From a4aabd9f3e9caafe588706d19a9fcae925f9abdd Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 29 Mar 2018 07:24:05 -0400 Subject: [PATCH] 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 --- chrome/content/zotero/xpcom/server_connector.js | 5 ++++- 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 index 9c28c1d88..4bd463c2a 100644 --- 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); + } } } }