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
This commit is contained in:
parent
24b5f2efb4
commit
13812f46b4
1 changed files with 7 additions and 1 deletions
|
@ -1702,11 +1702,17 @@
|
||||||
// Otherwise let the autocomplete popup handle matters
|
// Otherwise let the autocomplete popup handle matters
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle Shift-Enter on creator input field
|
|
||||||
handleCreatorRowKeyDown(event) {
|
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");
|
let target = event.target.closest("editable-text");
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
|
|
||||||
|
// Handle Shift-Enter on creator input field
|
||||||
if (event.key == "Enter" && event.shiftKey) {
|
if (event.key == "Enter" && event.shiftKey) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
// Value has changed - focus empty creator row at the bottom
|
// Value has changed - focus empty creator row at the bottom
|
||||||
|
|
Loading…
Reference in a new issue