[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:
@@ -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'))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user