On Wed, 24 Apr 2024 12:54:01 GMT, Oliver Kopp <d...@openjdk.org> wrote:

>> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>> 
>> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, 
>> then an addition of `start` to it leads to a negative value. This is "fixed" 
>> by using `Math.max` comparing the `maxLength` and `maxLength + start`.
>
> Oliver Kopp has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Re-order for more clearness

I tested the fix with a simple TextArea sample and observed an issue that: 
Windows Narrator reads only the last character of the Text in a TextArea, when 
moving the cursor, and the focus rect does not move with cursor.

Steps:
1. Launch Windows Narrator (shortcut key combination: Windows + Ctrl + Enter)
2. Run a simple TextArea sample with fix 

public class TextAreaTest extends Application  {
    @Override
    public void start(Stage primaryStage) {
        primaryStage.setScene(new Scene(new VBox(new TextArea("javafx test"))));
        primaryStage.show();
    }
}


-> Observe that a Fcous Rect is drawn around all text in TextArea.

3. Press right arrow key to move cursor
-> Observe that:
i. Focus rect is drawn around the last character, even though the cursor is 
elsewhere
ii. With every right arrow key press, Narrator always read 't'

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

PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2075219300

Reply via email to