diff --git a/chrome/content/zotero/elements/attachmentBox.js b/chrome/content/zotero/elements/attachmentBox.js index 6c04806178..853e221ac6 100644 --- a/chrome/content/zotero/elements/attachmentBox.js +++ b/chrome/content/zotero/elements/attachmentBox.js @@ -700,7 +700,7 @@ let labelWrapper = event.target.closest(".meta-label"); if (labelWrapper.nextSibling.contains(document.activeElement)) { - document.activeElement.blur(); + ZoteroPane.itemsView.focus(); } else if (!labelWrapper.nextSibling.firstChild.readOnly) { labelWrapper.nextSibling.firstChild.focus(); diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 9129d23807..d7bdc441cc 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -1679,7 +1679,15 @@ let labelWrapper = label.closest(".meta-label"); if (labelWrapper.nextSibling.contains(document.activeElement)) { - document.activeElement.blur(); + // click on label when value field is already focused + // will refocus itemTree in library tab or reader content in reader tab + if (Zotero_Tabs.selectedType === "library") { + ZoteroPane.itemsView.focus(); + } + else { + let reader = Zotero.Reader.getByTabID(Zotero_Tabs.selectedID); + reader.focus(); + } } else { let valueField = labelWrapper.nextSibling.firstChild;