On Wed, 6 Jul 2022 22:28:23 GMT, Kevin Rushforth <k...@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

Reply via email to