RFR: 8296621: Stage steals focus on scene change
Kevin Rushforth
kcr at openjdk.org
Sat Nov 12 16:10:37 UTC 2022
On Wed, 9 Nov 2022 00:53:19 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.
I agree that changing from one scene to another should not cause a new request focus call. My only concern is to ensure that this will not cause any regressions for the initial setting of a scene. A safer change might be to qualify the existing call to `requestFocus` with a check of the previous scene, and only call it if `oldScene == null`.
Also, is it possible to add an automated unit test? If not, then a manual test would be in order.
-------------
PR: https://git.openjdk.org/jfx/pull/940
More information about the openjfx-dev
mailing list