52069d415878530954cc12f10810612ab4011856
lrnassar
Fri Mar 20 14:27:55 2026 -0700
Fix Tab to Tools dropdown not opening after Escape on Genomes/Genome Browser links. The suppressFocus flag was not being reset when focus moved to an parent item, causing the next button focus handler to skip. refs #37252
diff --git src/hg/js/jquery.plugins.js src/hg/js/jquery.plugins.js
index 7633ff8631f..c2603b13030 100644
--- src/hg/js/jquery.plugins.js
+++ src/hg/js/jquery.plugins.js
@@ -212,30 +212,31 @@
$menu.on('blur', 'li.menuparent > button', function() {
var $li = $(this).parent();
var o = $.fn.superfish.op;
var delay = (o && o.delay) ? o.delay : 800;
var menu = $menu[0];
clearTimeout(menu.sfTimer);
var $btn = $(this);
menu.sfTimer = setTimeout(function() {
$li.hideSuperfishUl();
$btn.attr('aria-expanded', 'false');
}, delay);
});
// Sync aria-expanded for -based parent items (Genomes, Genome Browser)
$menu.on('focus', 'li.menuparent > a[aria-expanded]', function() {
+ suppressFocus = false; // reset flag so next button Tab works
$(this).attr('aria-expanded', 'true');
});
$menu.on('blur', 'li.menuparent > a[aria-expanded]', function() {
var $a = $(this);
setTimeout(function() {
if (!$a.parent().hasClass('over')) {
$a.attr('aria-expanded', 'false');
}
}, 900);
});
// Sync aria-expanded on mouse hover for all parent items
$menu.on('mouseenter', 'li.menuparent', function() {
$(this).find('> button, > a[aria-expanded]').attr('aria-expanded', 'true');