qf: default arrowUp handling on locator menulist (#4965)

Do not close details panel on arrowUp when locator
type menulist is focused to allow for default handling
(e.g. select the next/previous option on windows).

Fixes: #4953
This commit is contained in:
abaevbog 2025-01-02 19:42:38 -08:00 • committed by GitHub
parent 0b44461a66
commit 7dad8377df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2278,7 +2278,8 @@ var Zotero_QuickFormat = new function () {
}
}
// Arrow up closes the popup
if (event.key === "ArrowUp") {
// (except on locator type dropdown to allow for default handling)
if (event.key === "ArrowUp" && event.target.tagName !== "menulist") {
skipInputRefocus = true;
itemPopover.hidePopup();
return stopEvent();