diff --git a/chrome/content/zotero/xpcom/server/saveSession.js b/chrome/content/zotero/xpcom/server/saveSession.js index 7f8f94ff1c..81508a1cc2 100644 --- a/chrome/content/zotero/xpcom/server/saveSession.js +++ b/chrome/content/zotero/xpcom/server/saveSession.js @@ -190,7 +190,7 @@ Zotero.Server.Connector.SaveSession = class { item = item.isTopLevelItem() ? item : item.parentItem; // Don't select if in trash if (!item.deleted) { - await zp.selectItem(item.id); + await zp.selectItem(item.id, { noTabSwitch: true, noWindowRestore: true }); } } } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index e432eb5266..c3fc74eae4 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3023,7 +3023,7 @@ var ZoteroPane = new function() Zotero.warn("ZoteroPane.selectItems() now takes an 'options' object -- update your code"); options = { inLibraryRoot: options }; } - let { inLibraryRoot, noTabSwitch } = options; + let { inLibraryRoot, noTabSwitch, noWindowRestore } = options; if (!itemIDs.length) { return false; } @@ -3034,7 +3034,7 @@ var ZoteroPane = new function() } // Restore window if it's in the dock - if (window.windowState == window.STATE_MINIMIZED) { + if (window.windowState == window.STATE_MINIMIZED && !noWindowRestore) { window.restore(); }