Shut down main window through x button, then start the api of Zotero_Tabs just contain zotero-pane

119 views
Skip to first unread message

Vincent

unread,
Feb 12, 2025, 10:48:37 PM2/12/25
to zotero-dev
Hello, I encountered a strange problem, when i shut down main window of Zotero by X button, then start, the hook of onMainWindowLoad was triggled, but Zotero_Tabs just contain zotero-pane, all other tabs missing. However when i quit Zotero not by X button, the Zotero_Tabs ok. Looking for help, thanks!

Vincent

unread,
Feb 14, 2025, 12:29:18 PM2/14/25
to zotero-dev
I have basically figured out that onMainWindowLoad only triggers the loading of the main library window, not includes the restore of Tabs. Zotero_Tabs needs to be manually loaded by listening to the tab's recovery signal. If not manually processed, Zotero_Tabs would only contain main library window.
It is a problem with Zotero's design mechanism.

XY Wong

unread,
Feb 14, 2025, 12:38:39 PM2/14/25
to zotero-dev
It's only possible to provide help if 1) you provide steps to reproduce in troubleshooting mode; 2) you describe the expected behavior and the actual behavior more accurately. 


> Zotero_Tabs needs to be manually loaded 

I don't understand what you mean


> by listening to the tab's recovery signal

Also, I don't understand what is a so-called `tab's recovery signal`.

If not manually processed

How? Could you please provide the code for the so-called `manually processed`?

Vincent

unread,
Feb 15, 2025, 6:01:42 AM2/15/25
to zotero-dev
Thank you! I have figured out and solved the issue now. Briefly describe the issue encountered and the solution. Maybe someone will also encounter this issue, I hope it helps. 
When onMainWindowLoad is triggled just by closing X button, while not quitting Zotero. Zotero_Tabs just contain zotero-pane, not include other opened tabs before. If you want the complete Zotero_Tabs, you should add the tabs all by your self.

XY Wong

unread,
Feb 19, 2025, 1:15:02 PM2/19/25
to zotero-dev
I cannot reproduce what you described. Are you sure you are running the latest Zotero beta with all plugins disabled?

Zotero should be able to restore all opened tabs after closing and reopening the main window.

Or, do you mean by the time the `onMainWindowLoad` is called, the tabs are not restored yet? That is expected. You'll need to manually wait for the tabs to open, instead of "add the tabs all by your self" (which is a wrong solution and will definitely duplicate these tabs).

Or, if you mean you created custom tabs, then they are not managed by Zotero and are not restored of course.
Reply all
Reply to author
Forward
0 new messages