It looks like left-arrow navigation breaks if the text contains RTL characters.
* To reproduce:
* place the cursor on a line following "Arabic: العربية"
* and try going back with arrow-left key.
Alternatively, simply inserting the following string into a TextArea results in left arrow / right arrow keys inoperable, even when the right font is selected:
"Arabic: \u0627\u0644\u0639\u0631\u0628\u064a\u0629";
(use MonkeyTester TextArea page, set Al Bayan Bold font on Mac, for example)
Fails on Mac Ventura 13.1 and Windows 11
edit 2023/10/11:
1. The navigation also fails with jsk 1.8.0_131 (windows 10) but slightly differently. the cursor does move across LTR text, then fails somewhere in the middle of RTL (Hebrew) text. Try this text string: Hebrew עִבְֿרִית, Ivrit
"Hebrew \u05e2\u05b4\u05d1\u05b0\u05bf\u05e8\u05b4\u05d9\u05ea, Ivrit"
2. Looks like there exist a wide variety of behaviors with respect to bidi text, summarized in this gist:
https://gist.github.com/andy-goryachev-oracle/4802f9380fb03ec2be7ac36bd98a2059
The question is - how FX should work, considering that it seems to be navigating differently than swing in jfx8, and it might work differently (though we never know because it never did) with jfx17+?
edit 2024/11/20:
The issue also appears when the text control (TextField, TextArea, PasswordField) is set to NodeOrientation.RIGHT_TO_LEFT, even without bidi text.
* To reproduce:
* place the cursor on a line following "Arabic: العربية"
* and try going back with arrow-left key.
Alternatively, simply inserting the following string into a TextArea results in left arrow / right arrow keys inoperable, even when the right font is selected:
"Arabic: \u0627\u0644\u0639\u0631\u0628\u064a\u0629";
(use MonkeyTester TextArea page, set Al Bayan Bold font on Mac, for example)
Fails on Mac Ventura 13.1 and Windows 11
edit 2023/10/11:
1. The navigation also fails with jsk 1.8.0_131 (windows 10) but slightly differently. the cursor does move across LTR text, then fails somewhere in the middle of RTL (Hebrew) text. Try this text string: Hebrew עִבְֿרִית, Ivrit
"Hebrew \u05e2\u05b4\u05d1\u05b0\u05bf\u05e8\u05b4\u05d9\u05ea, Ivrit"
2. Looks like there exist a wide variety of behaviors with respect to bidi text, summarized in this gist:
https://gist.github.com/andy-goryachev-oracle/4802f9380fb03ec2be7ac36bd98a2059
The question is - how FX should work, considering that it seems to be navigating differently than swing in jfx8, and it might work differently (though we never know because it never did) with jfx17+?
edit 2024/11/20:
The issue also appears when the text control (TextField, TextArea, PasswordField) is set to NodeOrientation.RIGHT_TO_LEFT, even without bidi text.
- blocks
-
JDK-8343557 ☂ RTL Issues in Controls
- Open
- relates to
-
JDK-8248914 Javafx TextField positions the cursor incorrectly after pressing DEL key
- Resolved
-
JDK-8242616 Regression: RTL - TextField Cursor Movement Via Keyboard
- Open
-
JDK-8088571 TextArea, caret problem at the left-most or right-most of the text.
- Open
-
JDK-8314895 macOS: selection irregularities in TextArea
- Open
-
JDK-8342233 Regression: TextInputControl selection is backwards in RTL mode
- In Progress
- links to
-
Review openjdk/jfx/1220
(1 relates to, 1 links to)