From 242405323e3ae2de8f7dfbb45fa99dd4833a6120 Mon Sep 17 00:00:00 2001 From: attila Date: Fri, 25 Jul 2025 17:29:36 +0200 Subject: [PATCH] ComboBox: Fix accessibility navigation when the PopupMenu has a parent component With the PopupMenu creating its own window the focus would return to the ComboBox after activating a menu item. Prior to this commit however the focus was seemingly lost after menu item activation. With this change the focus returns to the ComboBox in both cases. --- modules/juce_gui_basics/widgets/juce_ComboBox.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index c0cba0782e..cca35f1645 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -523,6 +523,9 @@ static void comboBoxPopupMenuFinishedCallback (int result, ComboBox* combo) if (result != 0) combo->setSelectedId (result); + + if (auto* handler = combo->getAccessibilityHandler()) + handler->grabFocus(); } }