Files
odoo_source/addons/web_editor
Nicolas Bayet 0f668e28bf [FIX] web_editor: allow non editable to be unbreakable
When starting the editor in a web page, if there is no content, the
oe_structure is not editable. Adding snippet at that moment will
trigger `idSet` on the node with isUnbreakable returning `false` for
the node that is unbreakable because of the check
`!node.isContentEditable` in `isUnbreakable`.

When setting the ouid for the first time with `idSet`, `getOuid` is
called with `optimize` to `true`. So all the ancestor of a node that
should be unbreakable will have the wrong ouid.

Performing any command to a node with a wrong ouid is suceptible to
wrongly be reverted.

By removing `!node.isContentEditable`, the node will have the proper
ouid in case an ancestor is not editable.

task-2633368

closes odoo/odoo#79108

X-original-commit: 13804df7740317b8198e7c1de418ff019c05862b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-10-28 07:49:29 +00:00
..
…
2021-10-05 16:54:21 +00:00