mirror of https://github.com/zulip/zulip.git
navbar_menu: Refactor keyboard events for navbar menu.
This commit extracts menu switching logic from `handle_keyboard_events` to separate `change_active_navbar_menu` to toggle between the current active navbar menu and the adjacent navbar menu.
This commit is contained in:
parent
9d578247a7
commit
566e5e688b
|
@ -17,7 +17,10 @@ export function handle_keyboard_events(event_name) {
|
|||
if (!allowed_events.has(event_name)) {
|
||||
return false;
|
||||
}
|
||||
return change_active_navbar_menu(event_name);
|
||||
}
|
||||
|
||||
function change_active_navbar_menu(event_name) {
|
||||
// We don't need to process arrow keys in navbar menus for spectators
|
||||
// since they only have gear menu present.
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue