[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-openjfx-dev
Subject: RFR: 8293795: [Accessibility] [Win] [Narrator] Exceptions when deleting text with continous key pres
From: Ambarish Rapte <arapte () openjdk ! org>
Date: 2022-09-30 15:20:02
Message-ID: GfyfhZzepT1E_fKwu8xtO__Pinrf4Am0SIM5djycjkw=.f3de5152-d0ff-4eb6-b7e8-541e76f13664 () github ! com
[Download RAW message or body]
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/35675c8d27d54a26059b182614e18152794d \
bcec/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
-------------
Commit messages:
- validateRange before accessing text string
Changes: https://git.openjdk.org/jfx/pull/907/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=907&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8293795
Stats: 24 lines in 1 file changed: 16 ins; 4 del; 4 mod
Patch: https://git.openjdk.org/jfx/pull/907.diff
Fetch: git fetch https://git.openjdk.org/jfx pull/907/head:pull/907
PR: https://git.openjdk.org/jfx/pull/907
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic