-
- Downloads
[FIX] web_editor: prevent changing block when navigating near zws
In cases where the cursor is at the end of the current block and the next block
begins with a zero-width space, the mechanism that skips these characters while
using arrow keys should not traverse all the way to the end of the zero-width
space in the next block. Because this mechanism operates before the browser
applies its own behavior for arrow keys, potentially causing the cursor to jump
to the start of the third block when second block only contains a zero-width
space, completely bypassing the second block. Conversely true for the arrow left
keys.
This commit ensures that the navigation does not extend beyond the current block
when searching for a `newFocusNode` when moving with arrow keys near zero-width
space.
task-3653307
closes odoo/odoo#153217
Signed-off-by:
Antoine Guenet (age) <age@odoo.com>
Showing
- addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js 11 additions, 9 deletions...editor/static/src/js/editor/odoo-editor/src/OdooEditor.js
- addons/web_editor/static/src/js/editor/odoo-editor/test/spec/editor.test.js 40 additions, 0 deletions...static/src/js/editor/odoo-editor/test/spec/editor.test.js
Loading
Please register or sign in to comment