On Thu, 8 Oct 2026 11:59:23 GMT, Robert Lichtenberger <[email protected]> 
wrote:

>> As analysed in the bug, the previousWord() method does not work correctly if 
>> at the word boundary a character is found that is neither letter nor digit.
>> This fix changes the method so that only ranges of whitespace will be 
>> skipped, resulting in correct word selection behaviour.
>> A test case has been added to TextAreaTest.
>> gradlew :controls:test --tests test.javafx.scene.control.Text*Test has been 
>> executed to ensure no regressions happen in other text related classes. No 
>> errors were reported.
>> 
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Robert Lichtenberger has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8264588: move working case, improve click testing infrastructure

modules/javafx.controls/src/test/java/test/javafx/scene/control/behavior/TextInputControlTestBase.java
 line 487:

> 485:             double y = leading ? (bounds.getMinY() + dh) : 
> (bounds.getMaxY() - dh);
> 486:             for (int i = 1; i <= clickCount; i++) {
> 487:                 mouse.fireMousePressAndRelease(i, x - 
> control.getLayoutBounds().getWidth() / 2, y - 
> control.getLayoutBounds().getHeight() / 2);

maybe we can extract the final x and y coordinate as variable. Maybe targetX, 
targetY.
Also has the advantage, as we are in a loop that we only need to calculate it 
once outside the loop (beside improving readability a bit)

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2334#discussion_r4218744939

Reply via email to