RFR: 8342233: Regression: TextInputControl selection is backwards in RTL mode
Andy Goryachev
angorya at openjdk.org
Mon Dec 2 17:20:45 UTC 2024
On Wed, 27 Nov 2024 14:15:53 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:
>> A fix for [JDK-8319844](https://bugs.openjdk.org/browse/JDK-8319844) Text/TextFlow.hitTest() introduced a regression in the `TextArea`/`TextField`/`PasswordField` in the RTL mode.
>>
>> The fix is to flip the x coordinates when needed in the `TextAreaSkin`/`TextFieldSkin`.
>>
>> The RTL node orientation also breaks navigation using keyboard arrow keys, but that's a different issue: [JDK-8296266](https://bugs.openjdk.org/browse/JDK-8296266).
>>
>> ---
>>
>> I tried to devise a headful test, but it is currently blocked by [JDK-8189167](https://bugs.openjdk.org/browse/JDK-8189167)
>>
>> The fix can be tested manually using the Monkey Tester, with the headful test to be added probably as a part of [JDK-8326869](https://bugs.openjdk.org/browse/JDK-8326869) .
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextAreaSkin.java line 831:
>
>> 829: protected int getInsertionPoint(double x, double y) {
>> 830: TextArea textArea = getSkinnable();
>> 831: Text n = getTextNode();
>
> What's the reason for the name change `paragraphNode -> n`?
The change made the following `if` statement easier to digest fit on a single line.
It's a local variable within a short function, I think it should be ok.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1609#discussion_r1866278668
More information about the openjfx-dev
mailing list