Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

navbar_menu: Add keyboard event check for navbar navigation.

Pratik Chanda9d578247a733
diff --git a/web/src/navbar_menus.js b/web/src/navbar_menus.js
index b4489197c9a..54310f503d6 100644
--- a/web/src/navbar_menus.js
+++ b/web/src/navbar_menus.js
@@ -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 (