Re: RFR: 8296266: TextArea: Navigation breaks with RTL text [v3]

2023-10-13 Thread Andy Goryachev
> 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 differen

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text [v2]

2023-10-09 Thread Andy Goryachev
> 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 differen

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Andy Goryachev
On Mon, 9 Oct 2023 22:42:45 GMT, Andy Goryachev wrote: >> JDK 8u doesn't have the fixes to deal with all of the macOS fonts in current >> macOS, so its a little hard for me to test Arabic/bidi there since I get >> garbage text. >> >> I don't see that mirroring that you see, neither setting it

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Andy Goryachev
On Mon, 9 Oct 2023 22:41:21 GMT, Phil Race wrote: >> what is going on?? JTextArea inside a Scene with RTL orientation: >> >> > src="https://github.com/openjdk/jfx/assets/107069028/1bd9cda3-71d5-4e41-b475-d5b6c2a010d3";> > > JDK 8u doesn't have the fixes to deal with all of the macOS fonts in cu

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Phil Race
On Mon, 9 Oct 2023 22:24:37 GMT, Andy Goryachev wrote: >> what if you have a mixture of RTL and LTR text in JDK8? >> I am going to double check the behavior in JTextArea as well. > > what is going on?? JTextArea inside a Scene with RTL orientation: > > src="https://github.com/openjdk/jfx/asset

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Andy Goryachev
On Mon, 9 Oct 2023 22:17:50 GMT, Andy Goryachev wrote: >> PS if I just use simple ASCII text and set Node Orientation to RTL, then >> with your fix >> then left arrow moves right and right arrow moves left. >> In JDK 8 left arrow moved left and right arrow moved right. >> With an FX 17 build I h

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Andy Goryachev
On Mon, 9 Oct 2023 22:14:10 GMT, Phil Race wrote: >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextAreaSkin.java >> line 572: >> >>> 570: if (isRTL()) { >>> 571: // Text node is mirrored. >>> 572: moveRight = !moveRight; >> >> This method c

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Phil Race
On Mon, 9 Oct 2023 21:58:54 GMT, Phil Race 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 wi

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Andy Goryachev
On Mon, 9 Oct 2023 20:44:24 GMT, Phil Race 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 wi

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-09 Thread Phil Race
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-04 Thread Andy Goryachev
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-04 Thread Karthik P K
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-10-04 Thread Ajit Ghaisas
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-09-29 Thread Andy Goryachev
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-09-01 Thread Karthik P K
On Thu, 31 Aug 2023 19:04:12 GMT, Andy Goryachev wrote: > 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 > g

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-08-31 Thread Andy Goryachev
On Wed, 30 Aug 2023 12:10:37 GMT, Karthik P K 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

Re: RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-08-30 Thread Karthik P K
On Tue, 22 Aug 2023 20:46:21 GMT, Andy Goryachev 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 > w

RFR: 8296266: TextArea: Navigation breaks with RTL text

2023-08-25 Thread Andy Goryachev
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