mirror of https://github.com/zulip/zulip.git
hotkey: Toggle gear_menu on clicking `g` hotkey.
This commit toggles the gear_menu on pressing the `g` keyboard hotkey, if it's already open. Fixes: #24417. Co-authored-by: Tim Abbott <tabbott@zulip.com>
This commit is contained in:
parent
d96048b0af
commit
fc1477499b
|
@ -662,6 +662,13 @@ export function process_hotkey(e, hotkey) {
|
|||
}
|
||||
|
||||
if (hotkey.message_view_only && gear_menu.is_open()) {
|
||||
// Inside the gear menu, we don't process most hotkeys; the
|
||||
// exception is that the gear_menu hotkey should toggle the
|
||||
// menu closed again.
|
||||
if (event_name === "gear_menu") {
|
||||
gear_menu.close();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue