RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v4]

Travis Furrer duke at openjdk.org
Wed Oct 11 17:52:40 UTC 2023


On Fri, 18 Aug 2023 21:16:03 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> question: what happens when the user navigates away when editing the cell?  it looks like the fix correctly handles the situation.  are there any other possible scenarios?
>> 
>> <img width="644" alt="Screenshot 2023-08-18 at 13 53 02" src="https://github.com/openjdk/jfx/assets/107069028/cab1ffaf-78bf-493a-bf6d-18d8e2525d3c">
>
>> question: what happens when the user navigates away when editing the cell? it looks like the fix correctly handles the situation. are there any other possible scenarios?
> 
> I don't think there are, because now we're correctly handling the two scenarios that affect the `focusWithin` count:
> 1. Removing a non-zero focusWithin node from the scene graph
> 2. Adding a non-zero focusWithin node to the scene graph
> 
> As for your question what happens when the user navigates away from an editable cell: I think there's [JDK-8089514](https://bugs.openjdk.org/browse/JDK-8089514) to track that.

@mstr2 or @Maran23 Does "focus owner" == "input focus" == "scene focus owner" == where key events will be sent?

I ask because the javadoc on Node.focusWithin says "Indicates whether this Node or any of its descendants currently has the **_input focus_**.", but in discussions it has been said that focusWithin includes a TableView's "focused item" even if that is not the scene's current focus owner (i.e. where key events will be sent).

It would be great if the javadoc for Node.focusWithin could be improved to avoid this kind of widespread confusion about what it really means...

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

PR Comment: https://git.openjdk.org/jfx/pull/1210#issuecomment-1758183502


More information about the openjfx-dev mailing list