On Fri, 18 Aug 2023 21:25:38 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> thank you for explanations!
> 
> one more question: suppose, prior to removal of the Pane it contained a 
> focused (Scene.focusOwner) Node.
> 
> 1. once the Pane is removed, what happens to Scene.focusOwner?

There's quite a bit of logic happening. `Scene.focusCleanup()` is a good 
starting point. Basically, we need to find a new focus owner if the old focus 
owner is removed from the scene graph.

> 2. once the Pane is added back, would we have an inconsistent state in 
> respect to Scene.focusOwner (if some other node requested focus in the mean 
> time, wouldn't we have two focused nodes?)

It's not inconsistent, but it wouldn't be the same state as before. The 
`focused` state would remain, but `Scene.focusOwner` would not be restored to 
the previous node. That part of the focus story hasn't changed with the 
introduction of `focus-visible` and `focus-within`.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1210#discussion_r1298887190

Reply via email to