RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]
John Hendrikx
jhendrikx at openjdk.org
Fri Aug 18 09:22:33 UTC 2023
On Thu, 17 Aug 2023 00:30:45 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> This PR fixes an issue with the way `focusWithin` bits are adjusted in the scene graph. Previously, the `focusWithin` counts of all parents of a removed node would be decreased if the removed node has a non-zero `focusWithin` count. This PR adds logic for the opposite scenario: the `focusWithin` count is increased on all parents of a newly-added node that is already focused (or contains other focused nodes).
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed unnecessary code
I had a look, but have some questions.
modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8201:
> 8199:
> 8200: // Since focus changes are atomic, we only fire change notifications after
> 8201: // all changes are committed on all old and new parents.
Is it possible a user can interfere with this process by adding a listener to `focusWithinProperty`? It fires events when it goes from `true` to `false` and vice versa.
-------------
PR Review: https://git.openjdk.org/jfx/pull/1210#pullrequestreview-1584176874
PR Review Comment: https://git.openjdk.org/jfx/pull/1210#discussion_r1298215694
More information about the openjfx-dev
mailing list