ToggleButton behavior

John Hendrikx john.hendrikx at gmail.com
Sat Dec 2 07:21:35 UTC 2023


In my exploration of a potential Behavior API, I discovered this oddity 
in how ToggleButtons work.

1. If you have a single ToggleButton that is not part of a ToggleGroup, 
you can't navigate away from it with the arrow keys, only by using Tab 
or Shift-Tab.

2. If you have that same single ToggleButton, but it does have a group 
(a group of one) then you CAN navigate away from it with the arrow keys.

3. When you have two ToggleButtons, both part of the same group, then 
you can only navigate away from the group with Tab or Shift-Tab again, 
as the arrow keys will loop back to the first/last button when the end 
of the group is reached.

I get the impression at least one of these is incorrect.

I mean, either ToggleButtons should always loop, even if it is a group 
of one, meaning (2) would be incorrect...

Or... ToggleButtons should never loop, in which case (1) and (3) are 
incorrect...

Or... Single ToggleButtons (grouped or not) behave differently and don't 
do looping, in which case (1) is incorrect

Thoughts?

--John



More information about the openjfx-dev mailing list