diff --git a/layout/xul/base/src/nsXULPopupManager.cpp b/layout/xul/base/src/nsXULPopupManager.cpp index dc50825c682..9ff89fababa 100644 --- a/layout/xul/base/src/nsXULPopupManager.cpp +++ b/layout/xul/base/src/nsXULPopupManager.cpp @@ -341,6 +341,10 @@ nsMenuPopupFrame* GetPopupToMoveOrResize(nsIFrame* aFrame) if (menuPopupFrame->PopupState() != ePopupOpenAndVisible) return nullptr; + nsIWidget* widget = menuPopupFrame->GetWidget(); + if (widget && !widget->IsVisible()) + return nullptr; + return menuPopupFrame; }