RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v4]
Michael Strauß
mstrauss at openjdk.org
Fri Aug 18 21:15:33 UTC 2023
On Fri, 18 Aug 2023 21:05:54 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> suppose we are removing a Pane with a bunch of Nodes in it that have non-zero focusWithin.count values. the parent of said Pane gets a zero count (which is correct), whereas the children of said Pane have their counts unchanged (I assume).
Correct.
> what happens when the same Pane gets added back to the scene graph? wouldn't we enter an inconsistent state?
That's what this patch fixes. If we later add the pane that contains a number of focused nodes back to the scene graph, the `focusWithin` count of its new parents (which was 0 before) is now incremented to match the number of contained focused nodes. The code starts in L8194.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1210#discussion_r1298869398
More information about the openjfx-dev
mailing list