On Mon, 28 Oct 2024 23:13:50 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> Good question, @hjohn . Why indeed, @mstr2 ? > >> If this flag is suddenly so important, then why doesn't `requestFocus` have >> it? > > That's easy: because we didn't deem it necessary. Back when we added the > flag, only internal code would be able to set it, and that has worked out > fine. Focus traversal using keyboard navigation didn't use `requestFocus()`. > > Now we have a public API, and we face the same question again. There is a > clear advantage of setting the focusVisible flag as a parameter of > `requestFocusTraversal`: we ensure consistency between `focused` and > `focusVisible`, such that a node cannot be focusVisible if not focused. > Having focusVisible be a writable property would allow applications to have a > node visibly indicate focus, or even multiple independent nodes indicating > visible focus simultaneously, while yet another node is actually focused. > That's not good. Perhaps we need to further clarify what the focused/focusVisible/focusWithin properties are for? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1604#discussion_r1819886771