commit a4aabd9f3e9caafe588706d19a9fcae925f9abdd
parent 00d85fb6da943f6559d080979aa57a09a8fc3c8d
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 29 Mar 2018 07:24:05 -0400
Don't select items in trash on target selector change
Items in the trash will still be updated properly (since they can still
exist in collections and have tags), but the collection selected in the
target selector should remain selected in the client.
Addresses zotero/zotero-connectors#220
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js
@@ -151,7 +151,10 @@ Zotero.Server.Connector.SaveSession.prototype.update = async function (libraryID
if (this._objects.item.size == 1) {
let item = Array.from(this._objects.item)[0];
item = item.isTopLevelItem() ? item : item.parentItem;
- await win.selectItem(item.id);
+ // Don't select if in trash
+ if (!item.deleted) {
+ await win.selectItem(item.id);
+ }
}
}
}