Integrated: 8293795: [Accessibility] [Win] [Narrator] Exceptions when deleting text with continous key press in TextArea and TextField
Ambarish Rapte
arapte at openjdk.org
Tue Oct 4 11:09:35 UTC 2022
On Fri, 30 Sep 2022 15:15:06 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
> This is a follow up bug-fix to [JDK-8284281](https://bugs.openjdk.org/browse/JDK-8284281)
>
> Issue:
> When Narrator is running,
> Following scenarios with TextField or TextArea cause IllegalArgumentException or NPE
>
> 1. Move cursor to beginning of line, Press and hold DELETE key
> 2. Move cursor to beginning of line, Press and hold CTRL + DELETE key
> 3. Move cursor to end of line, Press and hold BACKSPACE key
> 4. Move cursor to end of line, Press and hold CTRL + BACKSPACE key
>
> Fix:
> Two variable `start` and `end` in `WinTextRangeProvider` should be validated against text length
> 1. Added a method `validateRange()`, and is called several from methods which access text based on `start` and `end` variables
> 2. Partially reverted fix of [JDK-8284281](https://bugs.openjdk.org/browse/JDK-8284281) :
> - removed https://github.com/openjdk/jfx/blob/35675c8d27d54a26059b182614e18152794dbcec/modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinTextRangeProvider.java#L180
> - and used `validateRange()` instead to be symmetrical.
>
> Verification:
> To observe the issue.
>
> 1. Run any program with TextField and/or TextArea
> 2. Launch Windows Narrator
> 3. Run the exception causing scenarios several times:
>
> - Move cursor to beginning of line, Press and hold DELETE key
> - Move cursor to beginning of line, Press and hold CTRL + DELETE key
> - Move cursor to end of line, Press and hold BACKSPACE key
> - Move cursor to end of line, Press and hold CTRL + BACKSPACE key
This pull request has now been integrated.
Changeset: cc00c8d5
Author: Ambarish Rapte <arapte at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/cc00c8d5c7a73b9d9bc7c292ad51f8af9e63ff78
Stats: 25 lines in 1 file changed: 15 ins; 5 del; 5 mod
8293795: [Accessibility] [Win] [Narrator] Exceptions when deleting text with continous key press in TextArea and TextField
Reviewed-by: kcr, hmeda
-------------
PR: https://git.openjdk.org/jfx/pull/907
More information about the openjfx-dev
mailing list