From 13812f46b4beb20f34c727e718646f90d044ba80 Mon Sep 17 00:00:00 2001 From: abaevbog <bogdan@zotero.org> Date: Wed, 19 Jun 2024 02:28:26 -0400 Subject: [PATCH] open itembox creator type menu on arrowUp/down (#4257) To preserve behavior from zotero 6. We likely want to make the creator type menu a proper menulist in the future. Addresses: #4248 --- chrome/content/zotero/elements/itemBox.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 78622db987..2ecaea8627 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -1702,11 +1702,17 @@ // Otherwise let the autocomplete popup handle matters } - // Handle Shift-Enter on creator input field handleCreatorRowKeyDown(event) { + // Open creator type menu on arrowUp/Down as if it is a menulist + if (event.target.classList.contains("creator-type-label") + && ["ArrowDown", "ArrowUp"].includes(event.key)) { + event.target.click(); + return; + } let target = event.target.closest("editable-text"); if (!target) return; + // Handle Shift-Enter on creator input field if (event.key == "Enter" && event.shiftKey) { event.stopPropagation(); // Value has changed - focus empty creator row at the bottom