[FIX] web_editor: make o_editable unremovable

`o_editable` is not supposed to be removed.

Example of a problem if o_editable can be removed:
In translation mode, when deleting the text of the `o_editable` container,
that container could be removed but shouldn't.
See https://drive.google.com/file/d/1U_NUFBvUninOuFKn2H2c4BDcka3OetlD/view

task-2810332

closes odoo/odoo#89071

X-original-commit: 2010c0e2c402f5bb423a0fe683e51923e1e14042
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Nicolas Bayet
2022-04-20 09:33:01 +02:00
parent 3604d1783f
commit 595daa884a
@@ -965,7 +965,7 @@ export function isUnremovable(node) {
return (
node.oid === 'root' ||
(node.nodeType === Node.ELEMENT_NODE &&
(node.getAttribute('t-set') || node.getAttribute('t-call'))) ||
(node.classList.contains('o_editable') || node.getAttribute('t-set') || node.getAttribute('t-call'))) ||
(node.classList && node.classList.contains('oe_unremovable'))
);
}