[FIX] web_editor: remove toolbar on selection collape in table

Before this commit:

when selected cell is clicked, its selection collapses yet toolbar is visible.

After this commit:

Now toolbar is removed when selection collapses.

task-3458048

closes odoo/odoo#136533

X-original-commit: 89116f6f356df0b33ba61f8b2e725ae7530bdceb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
shsa-odoo
2023-09-25 18:09:55 +00:00
parent b8f7d1fe3e
commit 856149776e
@@ -4463,6 +4463,7 @@ export class OdooEditor extends EventTarget {
this.toolbar.style.pointerEvents = 'none';
if (this.deselectTable() && hasValidSelection(this.editable)) {
this.document.getSelection().collapseToStart();
this._updateToolbar(false);
}
}
// Handle table resizing.