From 951ed4fa4bb9affd23fcfb06c420de5736dae090 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Mon, 24 Mar 2025 21:06:49 -0700 Subject: [PATCH] citation dlg: fix menubar missing on first open (#5154) Do not wait for the itemTree to add the menubar but create it immediately and just initialize it when itemTree is ready. Fixes: #5153 --- chrome/content/zotero/integration/citationDialog.js | 1 + chrome/content/zotero/integration/citationDialog.xhtml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/chrome/content/zotero/integration/citationDialog.js b/chrome/content/zotero/integration/citationDialog.js index b552c8aeb2..e1a0688267 100644 --- a/chrome/content/zotero/integration/citationDialog.js +++ b/chrome/content/zotero/integration/citationDialog.js @@ -564,6 +564,7 @@ class LibraryLayout extends Layout { return undefined; } }); + doc.querySelector("item-tree-menu-bar").init(this.itemsView); // handle icon click to add/remove items itemsTree.addEventListener("mousedown", event => this._handleItemsViewRowClick(event), true); itemsTree.addEventListener("mouseup", event => this._handleItemsViewRowClick(event), true); diff --git a/chrome/content/zotero/integration/citationDialog.xhtml b/chrome/content/zotero/integration/citationDialog.xhtml index 0cda02f073..1900a29f51 100644 --- a/chrome/content/zotero/integration/citationDialog.xhtml +++ b/chrome/content/zotero/integration/citationDialog.xhtml @@ -45,6 +45,10 @@