RFR: 8091673: Public focus traversal API for use in custom controls [v3]
Michael Strauß
mstrauss at openjdk.org
Mon Oct 28 17:31:54 UTC 2024
On Mon, 28 Oct 2024 17:25:15 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> So you're proposing to change the specification of `focusVisible`. That needs to be discussed first.
>
> I do not. Why do you say that?
Because `focusVisible` is specified to _only_ be set as a result of keyboard navigation, not as a result of programmatic navigation.
`Node.focusVisible` specifies:
/**
* Indicates whether this {@code Node} should visibly indicate focus.
* This flag is set when the node acquires input focus via keyboard navigation,
* and it is cleared when the node loses focus or when {@link #requestFocus()}
* is called.
*
* @defaultValue false
* @since 19
*/
The [JBS issue](https://bugs.openjdk.org/browse/JDK-8268225) says:
> For JavaFX, "Node.focusVisible" would be set in addition to "Node.focused" if a scene graph node gained focus as a consequence of keyboard input. In all other cases, "Node.focusVisible" would not be set on a node.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1604#discussion_r1819469497
More information about the openjfx-dev
mailing list