On Wed, 8 Dec 2021 10:33:53 GMT, Jeanette Winzenburg <[email protected]> wrote:
>>> yeah that's true, but might happen behind the scenes - we can move a >>> focused node from one parent to another by simply adding it the new. >> >> Yes, you're right, I wasn't thinking of that behavior. I think that should >> be logically seen as an atomic operation, even though it might not be >> implemented as such. So in this case, `Scene.focusOwner` wouldn't change. >> However, I'd still argue that a node that is not part of the scene graph >> (non-atomically) should not be the focus owner of the scene graph. > >>However, I'd still argue that a node that is not part of the scene graph >>(non-atomically) should not be the focus owner of the scene graph. > > I agree :) > > But that's what seems to happen: in my example, add a handler to remove the > focused "moving" button. When removed, the scene's focus owner is either the > next focusable (the "move" button) or null if there is none. On re-adding the > button, it's either unfocused (if there had been a next focusable) or focused > (if there is none). Not sure what happens in your test snippet .. One more comment: Have you addressed all questions from @kleopatra ? ------------- PR: https://git.openjdk.org/jfx/pull/475
