mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
PopupMenu: Add explicit focus order to menu items
Without this VoiceOver will iterate over menu items left to right first, and iteration order will be affected by whether the PopupMenu gets broken up into multiple columns due to not enough screen space.
This commit is contained in:
parent
6c720bf3f1
commit
a662e5584b
1 changed files with 1 additions and 0 deletions
|
|
@ -391,6 +391,7 @@ struct MenuWindow : public Component
|
|||
if (i + 1 < menu.items.size() || ! item.isSeparator)
|
||||
{
|
||||
auto* child = items.add (new ItemComponent (item, options, *this));
|
||||
child->setExplicitFocusOrder (1 + i);
|
||||
|
||||
if (initialSelectedId != 0 && item.itemID == initialSelectedId)
|
||||
setCurrentlyHighlightedChild (child);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue