RFR: 8296621: Stage steals focus on scene change [v2]

Kevin Rushforth kcr at openjdk.org
Mon Dec 5 16:57:15 UTC 2022


On Sun, 13 Nov 2022 01:02:36 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:

>> Simple fix to not requestFocus() on scene change.
>> 
>> The attached bug sample shows that the TextField focused on the scene remains focused when the scene comes back.
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add test

I'll finish my testing soon. As long as the behavior for the initial display of the Stage is the same on all platforms before/after this fix, I think it is fine. In particular, the "after" behavior for switching Scenes that Ambarish documented above is what I would expect after this bug fix is integrated.

> A `Scene` is an implementation detail of a JavaFX application, and not something that users of an application will find meaningful. Since we don't attempt to change the window stacking order when the scene graph is changed, we also shouldn't attempt to do so when a `Scene` is changed.

Exactly what I was going to say.

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

PR: https://git.openjdk.org/jfx/pull/940


More information about the openjfx-dev mailing list