From eca5f6bea18e1a74692bd0e77416589cbe4617b4 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 5 Jun 2024 00:52:03 -0400 Subject: [PATCH] zotero://select handler: Switch to library tab (#4204) --- chrome/content/zotero/ZoteroProtocolHandler.jsm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/ZoteroProtocolHandler.jsm b/chrome/content/zotero/ZoteroProtocolHandler.jsm index 78c9018156..51bedbc6ab 100644 --- a/chrome/content/zotero/ZoteroProtocolHandler.jsm +++ b/chrome/content/zotero/ZoteroProtocolHandler.jsm @@ -895,12 +895,14 @@ function ZoteroProtocolHandler() { return; } - var zp = Zotero.getActiveZoteroPane(); + var win = Zotero.getMainWindow(); + var zp = win?.ZoteroPane; if (!zp) { // TEMP throw new Error("Pane not open"); } + win.Zotero_Tabs.select('zotero-pane'); if (params.objectType == 'collection') { return zp.collectionsView.selectCollection(results[0].id); }