[FIX] web_editor: handle arrow keys next to zero-width spaces
Consider the following situation: `<p>a[]b<span><zws></span>c</p>`, where `<zws>` is a zero-width space and `[]` is the collapsed selection. On pressing the `ArrowRight` key, we want to enter the `<span>` so we don't press once to be after the "b" then once again to be before the `<zws>`. The cases with a non-collapsed selection, and with the left arrow are analogous. This is what this commit allows us to handle. X-original-commit: 8e1d5ff3f3bdef8ca2f0eb069c62140260aad3f6 Part-of: odoo/odoo#86930
Showing
- addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js 47 additions, 0 deletionsaddons/web_editor/static/lib/odoo-editor/src/OdooEditor.js
- addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js 261 additions, 0 deletions...eb_editor/static/lib/odoo-editor/test/spec/editor.test.js
- addons/web_editor/static/lib/odoo-editor/test/utils.js 6 additions, 0 deletionsaddons/web_editor/static/lib/odoo-editor/test/utils.js
Loading
Please register or sign in to comment