diff --git a/chrome/content/zotero/integration/citationExplorer.js b/chrome/content/zotero/integration/citationExplorer.js index 6701c1caf2..2be769f398 100644 --- a/chrome/content/zotero/integration/citationExplorer.js +++ b/chrome/content/zotero/integration/citationExplorer.js @@ -166,6 +166,8 @@ window.ZoteroDocumentCitations = { onSelectionChange={this.onCitationSelectionChange.bind(this)} getRowString={index => this._renderedCitationRows[index].title} />); + // Remove focus from itemList if focus is on citationList + // to prevent highlighting in both lists domElem.addEventListener("focusin", (event) => { itemList?.selection.clearSelection() }); @@ -194,9 +196,12 @@ window.ZoteroDocumentCitations = { firstColumnExtraWidth: 28-16, }); await itemList.waitForLoad(); + // Remove focus from citationList if focus is on itemList + // to prevent highlighting in both lists domElem.addEventListener("focusin", (event) => { citationList?.selection.clearSelection() }); + document.querySelector("item-tree-menu-bar").init(itemList); } await itemList.changeCollectionTreeRow({ getItems: async () => filteredItems, diff --git a/chrome/content/zotero/integration/citationExplorer.xhtml b/chrome/content/zotero/integration/citationExplorer.xhtml index 121534ba9b..be249d60a3 100644 --- a/chrome/content/zotero/integration/citationExplorer.xhtml +++ b/chrome/content/zotero/integration/citationExplorer.xhtml @@ -42,9 +42,20 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" persist="screenX screenY width height" resizable="true"> + + + + + + + + + + + +
diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index c212adf248..19f305bfe7 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -2039,20 +2039,22 @@ var ItemTree = class ItemTree extends LibraryTree { moreItems.push(columnMenuitemElements[column.dataKey]); } } + + if (moreItems.length) { + // Sort fields and move to submenu + var collation = Zotero.getLocaleCollation(); + moreItems.sort(function (a, b) { + return collation.compareString(1, a.getAttribute('label'), b.getAttribute('label')); + }); + moreItems.forEach(function (elem) { + moreMenuPopup.appendChild(menupopup.removeChild(elem)); + }); - // Sort fields and move to submenu - var collation = Zotero.getLocaleCollation(); - moreItems.sort(function (a, b) { - return collation.compareString(1, a.getAttribute('label'), b.getAttribute('label')); - }); - moreItems.forEach(function (elem) { - moreMenuPopup.appendChild(menupopup.removeChild(elem)); - }); - - let sep = document.createXULElement('menuseparator'); - menupopup.appendChild(sep); - moreMenu.appendChild(moreMenuPopup); - menupopup.appendChild(moreMenu); + let sep = document.createXULElement('menuseparator'); + menupopup.appendChild(sep); + moreMenu.appendChild(moreMenuPopup); + menupopup.appendChild(moreMenu); + } } catch (e) { Zotero.logError(e);