MDL-78885 theme_boost: Revert 3a8eeedf of MDL-75274.

These changes that I'm undoing were not only wrong, but also not used
and were left over code.
This commit is contained in:
Shamim Rezaie 2023-10-02 23:54:20 +11:00
parent 535bfb3052
commit 2f023f9ebe
3 changed files with 3 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -79,13 +79,10 @@ const dropdownFix = () => {
const menu = e.target.parentElement.querySelector('[role="menu"]');
let menuItems = false;
let foundMenuItem = false;
let textInput = false;
if (menu) {
menuItems = menu.querySelectorAll('[role="menuitem"]');
textInput = e.target.parentElement.querySelector('[data-action="search"]');
}
if (menuItems && menuItems.length > 0) {
// Up key opens the menu at the end.
if (trigger === 'ArrowUp') {
@ -102,10 +99,7 @@ const dropdownFix = () => {
}
}
if (textInput) {
shiftFocus(textInput);
}
if (foundMenuItem && textInput === null) {
if (foundMenuItem) {
shiftFocus(foundMenuItem);
}
};