Files
ladybird/Tests/LibWeb/Text/expected/textarea-arrow-navigation.txt
Timothy Flynn 0e4fb9ae73 LibWeb: Ensure up/down arrow navigation is grapheme-aware
Previously, it was possible for an up/down arrow press to place the
cursor in the middle of a multi-code point grapheme cluster. We want to
prevent this in a way that matches the behavior of other browsers.

Both Chrome and Firefox will map the starting position to a visually
equivalent position in the target line with harfbuzz and ICU segmenters.
The need for this is explained in a code comment. The result is a much
more natural feeling of text navigation.
2025-08-18 13:17:28 +02:00

19 lines
675 B
Plaintext

Right: position=1 character="e"
Right: position=2 character="l"
Right: position=3 character="l"
Right: position=4 character="o"
Right: position=5 character=" "
Down: position=28 character="👩🏼‍❤️‍👨🏻"
Left: position=27 character=" "
Up: position=2 character="l"
Right: position=3 character="l"
Right: position=4 character="o"
Right: position=5 character=" "
Right: position=6 character="👩🏼‍❤️‍👨🏻"
Down: position=40 character=" "
Up: position=6 character="👩🏼‍❤️‍👨🏻"
Down: position=40 character=" "
Left: position=28 character="👩🏼‍❤️‍👨🏻"
Left: position=27 character=" "
Up: position=2 character="l"