From 07dcf66c72140d7db2658f86d953033b1817f95e Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Mon, 23 Oct 2023 12:25:59 +0000 Subject: [PATCH] navbar: Remove stale focus-dropdown code. We don't need this since we migrated the dropdown to tippy which handles the navigation via popover_items_handle_keyboard. --- web/src/gear_menu.js | 5 ----- web/src/personal_menu_popover.js | 6 ------ web/templates/navbar.hbs | 3 --- 3 files changed, 14 deletions(-) diff --git a/web/src/gear_menu.js b/web/src/gear_menu.js index 1e212fa19f..acfc020aae 100644 --- a/web/src/gear_menu.js +++ b/web/src/gear_menu.js @@ -111,11 +111,6 @@ export function initialize() { onMount(instance) { const $popper = $(instance.popper); popover_menus.popover_instances.gear_menu = instance; - $(".focus-dropdown").on("focus", (e) => { - e.preventDefault(); - $("#gear-menu-dropdown").find(".org-version a").trigger("focus"); - }); - $popper.on("click", ".webathena_login", (e) => { $("#zephyr-mirror-error").removeClass("show"); const principal = ["zephyr", "zephyr"]; diff --git a/web/src/personal_menu_popover.js b/web/src/personal_menu_popover.js index 417effb98e..a0626f9009 100644 --- a/web/src/personal_menu_popover.js +++ b/web/src/personal_menu_popover.js @@ -89,12 +89,6 @@ export function initialize() { popovers.hide_all(); e.preventDefault(); }); - - $(".focus-dropdown").on("focus", (e) => { - e.preventDefault(); - $popper.find("li:visible a").eq(0).trigger("focus"); - }); - instance.popperInstance.update(); }, onShow(instance) { diff --git a/web/templates/navbar.hbs b/web/templates/navbar.hbs index 7c3874f1a8..78c17a8683 100644 --- a/web/templates/navbar.hbs +++ b/web/templates/navbar.hbs @@ -55,19 +55,16 @@ -
-
-