Fix stuck "Loading items" at startup
Some checks are pending
CI / Build, Upload (push) Waiting to run
CI / Detect changes (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run

The collections tree selects a row as soon as it's initialized, which
raced with the items tree's initialization. If the collections tree won,
onCollectionSelected() threw on the missing items view and no items were
ever loaded.

https://forums.zotero.org/discussion/133379/
https://forums.zotero.org/discussion/133380/
This commit is contained in:
Dan Stillman 2026-08-23 18:53:25 -04:00
parent 786cdea884
commit 753dbf557a

View file

@ -573,8 +573,10 @@ var ZoteroPane = new function () {
Zotero_Tabs.init();
ZoteroContextPane.init();
await ZoteroPane.initCollectionsTree();
// The items tree has to be initialized first, since the collections tree selects a
// row as soon as it's initialized, which loads items into the items tree
await ZoteroPane.initItemsTree();
await ZoteroPane.initCollectionsTree();
ZoteroPane.initCollectionTreeSearch();
// Add a default progress window