[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-openjfx-dev
Subject: Re: RFR: 8296266: TextArea: Navigation breaks with RTL text
From: Andy Goryachev <angorya () openjdk ! org>
Date: 2023-08-31 19:07:10
Message-ID: dw5FjD8MWXvlA-rdtaKAeADFozXB5QenoGYfox8raXI=.8a3c2f58-5b06-4960-87a3-fc954db1a5f9 () github ! com
[Download RAW message or body]
On Wed, 30 Aug 2023 12:10:37 GMT, Karthik P K <kpk@openjdk.org> wrote:
> > The fix uses character BreakIterator instead of the logic that relies on \
> > caretBounds/hitTest/rangeShape in TextInputControl.nextCharacterVisually().
> > I believe this is a more reliable method of navigation, as it behaves in sync \
> > with the jdk break iterator, thought it might work differently around grapheme \
> > clusters, considering a recent change JDK-8291660
> > This change also introduces TextInputControlHelper class (impl. detail) which \
> > gives access to character- and word- break iterators cached by TextInputControl \
> > (*some say* these iterators and associated editing logic should be a part of \
> > Content implementation, but that's a discussion for another day).
>
> When the shortcut: cmd + right arrow is used to traverse the text area, caret is \
> displayed on the both sides of the RTL text as shown in screenshot below. This is \
> not observed if individual character is traversed using right arrow or shortcut \
> option + right arrow is used to traverse word by word. <img width="362" alt="image" \
> src="https://github.com/openjdk/jfx/assets/26969459/054b202f-c034-4f98-a56d-9521c1754e87">
> Rest of the changes look good to me.
Thank you for testing, @karthikpandelu !
> This is not observed if individual character is traversed using right arrow or \
> shortcut option + right arrow...
This statement is not exactly correct. Cmd+right navigates to a (visible) line end, \
in this case it's in the middle of the text string (index=8). So if you place the \
cursor after the colon (index=7) and press right arrow, you'll get the split caret in \
exact the same configuration as cmd+right.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1220#issuecomment-1701604665
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic