-
- Downloads
[FIX] web_editor: fix selection on editable root
Some of the Editor methods relies on not having inline elements at the editable root. For this reason, the cursor should never be placed at the editable root, but always inside a block element. Before this commit, in some situations (notably around tables and horizontal separators), the cursor could be placed having its anchorNode at the editable root, allowing the user to insert inlined text at it. This commit fixes the selection range in such cases, and an empty paragraph is inserted in cases where there would be no other way to insert text before or after an existing block. task-3128747 opw-3106752 Part-of: odoo/odoo#113379
Showing
- addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js 77 additions, 1 deletion...editor/static/src/js/editor/odoo-editor/src/OdooEditor.js
- addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js 1 addition, 1 deletion...ditor/static/src/js/editor/odoo-editor/src/utils/utils.js
Loading
Please register or sign in to comment