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.
This commit is contained in:
Aman Agrawal 2023-10-23 12:25:59 +00:00 committed by Tim Abbott
parent 75c874fef6
commit 07dcf66c72
3 changed files with 0 additions and 14 deletions

View File

@ -111,11 +111,6 @@ export function initialize() {
onMount(instance) { onMount(instance) {
const $popper = $(instance.popper); const $popper = $(instance.popper);
popover_menus.popover_instances.gear_menu = instance; 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) => { $popper.on("click", ".webathena_login", (e) => {
$("#zephyr-mirror-error").removeClass("show"); $("#zephyr-mirror-error").removeClass("show");
const principal = ["zephyr", "zephyr"]; const principal = ["zephyr", "zephyr"];

View File

@ -89,12 +89,6 @@ export function initialize() {
popovers.hide_all(); popovers.hide_all();
e.preventDefault(); e.preventDefault();
}); });
$(".focus-dropdown").on("focus", (e) => {
e.preventDefault();
$popper.find("li:visible a").eq(0).trigger("focus");
});
instance.popperInstance.update(); instance.popperInstance.update();
}, },
onShow(instance) { onShow(instance) {

View File

@ -55,19 +55,16 @@
<a class="header-button tippy-zulip-delayed-tooltip" tabindex="0" role="button" data-tooltip-template-id="help-menu-tooltip-template"> <a class="header-button tippy-zulip-delayed-tooltip" tabindex="0" role="button" data-tooltip-template-id="help-menu-tooltip-template">
<i class="zulip-icon zulip-icon-help" aria-hidden="true"></i> <i class="zulip-icon zulip-icon-help" aria-hidden="true"></i>
</a> </a>
<span tabindex="0" class="focus-dropdown"></span>
</div> </div>
<div id="gear-menu" class="{{#if embedded}}hide-navbar-buttons-visibility{{/if}}"> <div id="gear-menu" class="{{#if embedded}}hide-navbar-buttons-visibility{{/if}}">
<a id="settings-dropdown" tabindex="0" role="button" class="header-button tippy-zulip-delayed-tooltip" data-tooltip-template-id="gear-menu-tooltip-template"> <a id="settings-dropdown" tabindex="0" role="button" class="header-button tippy-zulip-delayed-tooltip" data-tooltip-template-id="gear-menu-tooltip-template">
<i class="zulip-icon zulip-icon-gear" aria-hidden="true"></i> <i class="zulip-icon zulip-icon-gear" aria-hidden="true"></i>
</a> </a>
<span tabindex="0" class="focus-dropdown"></span>
</div> </div>
<div id="personal-menu" class="hidden-for-spectators"> <div id="personal-menu" class="hidden-for-spectators">
<a class="header-button tippy-zulip-delayed-tooltip" tabindex="0" role="button" data-tooltip-template-id="personal-menu-tooltip-template"> <a class="header-button tippy-zulip-delayed-tooltip" tabindex="0" role="button" data-tooltip-template-id="personal-menu-tooltip-template">
<img class="header-button-avatar" src="{{user_avatar}}"/> <img class="header-button-avatar" src="{{user_avatar}}"/>
</a> </a>
<span tabindex="0" class="focus-dropdown"></span>
</div> </div>
</div> </div>
</nav> </nav>