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
This commit is contained in:
abaevbog 2025-03-24 21:06:49 -07:00 • committed by GitHub
parent cf37bf5ce1
commit 951ed4fa4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -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);

View file

@ -45,6 +45,10 @@
<script src="citationDialog.js"/>
<script src="../titlebar.js" type="text/javascript"/>
</head>
<!-- do not wait for itemTree to add the menubar, otherwise it does not appear on the first dialog open -->
<xul:item-tree-menu-bar/>
<body class="vbox flex">
<div id="search-area" class="layout">
<div id="search-row" class="hbox">