From ae7a262592ec835792fde3d65c38a46ffdd4e9a3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 12 Jun 2019 23:46:22 -0400 Subject: [PATCH] Don't switch to Retracted Items for single item from banner View button Only for multiple items --- chrome/content/zotero/zoteroPane.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index f56d56919a..3fea489dca 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4800,13 +4800,15 @@ var ZoteroPane = new function() link.textContent = Zotero.getString('retraction.alert.view.' + suffix); link.onclick = async function () { this.hideRetractionBanner(); - var libraryID = this.getSelectedLibraryID(); - // Select the Retracted Items collection - await this.collectionsView.selectByID("R" + libraryID); // Select newly detected item if only one if (items.length == 1) { await this.selectItem(items[0].id); } + // Otherwise select Retracted Items collection + else { + let libraryID = this.getSelectedLibraryID(); + await this.collectionsView.selectByID("R" + libraryID); + } }.bind(this); close.onclick = function () {