diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index a618f8fb48efd421b35a4eeb9884be562c98a9a8..06951bc7ef3b13589eef28647839eaeec2c3227e 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -396,11 +396,11 @@ var PopupSwitchMenuItem = GObject.registerClass({ activate(event) { if (this._switch.mapped) this.toggle(); - - // we allow pressing space to toggle the switch - // without closing the menu - if (event.type() == Clutter.EventType.KEY_PRESS && - event.get_key_symbol() == Clutter.KEY_space) + // The accessibility menu remains open if the event + // is triggered by a non-keyboard input or the space + // key. + if (event.type() !== Clutter.EventType.KEY_PRESS || + event.get_key_symbol() === Clutter.KEY_Space) return; super.activate(event);