mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
do not open hidden Zotero window on connector save
And fix regression where selecting a collection in connector would always switch to the library tab. It was originally added in https://github.com/zotero/zotero/pull/5020 but was lost after https://github.com/zotero/zotero/pull/5148.
This commit is contained in:
parent
1c469ce1a0
commit
f50e8b0b35
2 changed files with 3 additions and 3 deletions
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue