PY-70732 Close ComboBox popups before navigating back on ESC in welcome screen

The ESC handler in ActionGroupPanelWrapper only checked
StackingPopupDispatcher for open popups, missing Swing
JComboBox dropdowns that use MenuSelectionManager.
This caused the back action to fire while the interpreter
dropdown was still open, resulting in a stuck animation.

Use PopupUtil.handleEscKeyEvent() (same as DialogWrapper)
to properly close ComboBox popups before navigating back.

GitOrigin-RevId: 1797d76a0e25c8cb7207250b8415f87548036aea
This commit is contained in:
Vitaly Legchilkin
2026-02-14 00:25:50 +00:00
committed by intellij-monorepo-bot
parent 3613baab5c
commit 5fa3342204
@@ -14,6 +14,7 @@ import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.ui.popup.StackingPopupDispatcher;
import com.intellij.openapi.ui.popup.util.PopupUtil;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.util.Pair;
@@ -180,7 +181,9 @@ public final class ActionGroupPanelWrapper {
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
backAction.run();
if (!PopupUtil.handleEscKeyEvent()) {
backAction.run();
}
}
}.registerCustomShortcutSet(CommonShortcuts.ESCAPE, main, parentDisposable);
}