Browse Source

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.
v7.0.9
attila 2 years ago
parent
commit
a662e5584b
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp

+ 1
- 0
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -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…
Cancel
Save