diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index 95702233a4..a601c86b0e 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -505,7 +505,14 @@ void ComboBox::showPopupIfNotActive() if (! menuActive) { menuActive = true; - showPopup(); + + SafePointer safePointer (this); + + // as this method was triggered by a mouse event, the same mouse event may have + // exited the modal state of other popups currently on the screen. By calling + // showPopup asynchronously, we are giving the other popups a chance to properly + // close themselves + MessageManager::callAsync([safePointer] () mutable { if (safePointer != nullptr) safePointer->showPopup(); }); } }