Skip to content
Snippets Groups Projects
Commit 64c32a15 authored by Deependra Solanki's avatar Deependra Solanki
Browse files

[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: default avatarAntoine Guenet (age) <age@odoo.com>
parent ae5b77eb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment