mirror of https://github.com/zulip/zulip.git
navbar_menu: Add keyboard event check for navbar navigation.
This commit adds a keyboard event check statement for navbar navigation.
This commit is contained in:
parent
f197d881ca
commit
9d578247a7
|
@ -13,6 +13,11 @@ export function is_navbar_menus_displayed() {
|
|||
}
|
||||
|
||||
export function handle_keyboard_events(event_name) {
|
||||
const allowed_events = new Set(["gear_menu", "left_arrow", "right_arrow"]);
|
||||
if (!allowed_events.has(event_name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 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