PopupSwitchMenuItem: allow toggling without closing the menu
Similar to what Gtk does, now toggling with Space does not close the menu. https://bugzilla.gnome.org/show_bug.cgi?id=664416
This commit is contained in:
@ -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);
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user