diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 0a26ba71e..99199224c 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1252,7 +1252,7 @@ PopupMenuManager.prototype = { menu.sourceActor.grab_key_focus(); } else if (menu == this._activeMenu) { let focus = global.stage.key_focus; - let fromActive = this._activeMenuContains(focus); + let fromActive = focus && this._activeMenuContains(focus); if (this.grabbed) this._ungrab();