diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index aca4ae3de..58ca000fa 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -774,6 +774,12 @@ const PopupSwitchMenuItem = new Lang.Class({ 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) + return; + this.parent(event); }, diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 7862477bf..6c7de8ed6 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -613,7 +613,7 @@ const UserMenuButton = new Lang.Class({ this._statusChooser = item; item = new PopupMenu.PopupSwitchMenuItem(_("Notifications")); - item.connect('activate', Lang.bind(this, this._updatePresenceStatus)); + item.connect('toggled', Lang.bind(this, this._updatePresenceStatus)); this.menu.addMenuItem(item); this._notificationsSwitch = item;