RFR: 8268225: Support :focus-visible and :focus-within CSS pseudoclasses [v9]
Michael Strauß
mstrauss at openjdk.org
Wed Jul 6 23:44:42 UTC 2022
On Wed, 6 Jul 2022 22:28:23 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/ButtonBehavior.java line 181:
>>
>>> 179: */
>>> 180: protected void mousePressed(MouseEvent e) {
>>> 181: if (getNode().isFocusTraversable()) {
>>
>> The old code used to skip the call to `requestFocus()` if the node was already `focused` (here and in a couple other cases), in order to correctly update the `focusVisible` state. This is probably fine; can you think of any possible side effects of this?
>
> that should read:
>
> The old code used to skip the call to requestFocus() if the node was already focused (here and in a couple other cases). _It now always calls it_ in order to correctly update the focusVisible state.
I don't think there are any side effects, since the old code just returned from `Scene.(KeyHandler).requestFocus(Node)` without doing anything when the node was already the focus owner of the scene.
-------------
PR: https://git.openjdk.org/jfx/pull/475
More information about the openjfx-dev
mailing list