[jdk20] RFR: 8299077: [REDO] JDK-4512626 Non-editable JTextArea provides no visual indication of keyboard focus [v2]

Sergey Bylokhov serb at openjdk.org
Fri Dec 23 22:33:02 UTC 2022


On Wed, 21 Dec 2022 19:40:09 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Slightly updated original fix - got rid of the extra flasher reset. Tests are fixed to be more stable and pass on the corresponding platforms.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplifying the two nested if conditions into one.

I still think that the whole change is too generic, and affects many other places. For example, it will affect the XAWTCaret and the code added by the JDK-7129742. It seems the simpler change to make it always visible could cause fewer issues since we know that it works that way in awt on linux/windows.

test/jdk/javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java line 90:

> 88:         robot.waitForIdle();
> 89:         robot.delay(200);
> 90:         if (!field2.getCaret().isSelectionVisible()) {

This and the next test now checks behavior via the simple getter, but previously the test validated that the selection is actually visible on the screen which is more correct.

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

PR: https://git.openjdk.org/jdk20/pull/68



More information about the client-libs-dev mailing list