[FIX] web_editor: table cells not getting deselected

Current behaviour before commit:

After selecting cells in table, moving cursor through
arrowkeys doesn't deselect cells.

Desired behaviour after commit:

Now cells are getting deselected.

task-3718716

closes odoo/odoo#158265

X-original-commit: 0e8865e06b3cb7e8ee1a2c4983d06baef5b30933
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Adnan Saiyed (adsa) <adsa@odoo.com>
This commit is contained in:
Adnan Saiyed
2024-03-21 18:35:50 +00:00
parent 801ce62150
commit cccc9c47dc
@@ -4169,6 +4169,9 @@ export class OdooEditor extends EventTarget {
let appliedCustomSelection = false;
if (selection.rangeCount && selection.getRangeAt(0)) {
appliedCustomSelection = this._handleSelectionInTable();
if (!appliedCustomSelection) {
this.deselectTable();
}
// Handle selection/navigation at the edges of links.
const link = getInSelection(this.document, EDITABLE_LINK_SELECTOR);