From 72fbee55239fdda78972a211097be3b72f457e35 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 27 Jul 2017 00:11:13 -0400 Subject: [PATCH] Fix crash switching from Notes tab to feed item --- chrome/content/zotero/itemPane.js | 5 ----- chrome/content/zotero/zoteroPane.js | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index b1f01bafe..ba4462b65 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -98,11 +98,6 @@ var ZoteroItemPane = new function() { var viewBox = document.getElementById('zotero-view-item'); viewBox.classList.remove('no-tabs'); - // Switch to info pane for feed items - if (item.isFeedItem) { - index = viewBox.selectedIndex = 0; - } - if (index == 0) { document.getElementById('zotero-editpane-tabs').setAttribute('hidden', item.isFeedItem); diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index fd28cc62a..736616896 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1472,6 +1472,12 @@ var ZoteroPane = new function() document.getElementById('zotero-item-pane-content').selectedIndex = 1; var tabBox = document.getElementById('zotero-view-tabbox'); + + // Reset tab when viewing a feed item, which only has the info tab + if (item.isFeedItem) { + tabBox.selectedIndex = 0; + } + var pane = tabBox.selectedIndex; tabBox.firstChild.hidden = isCommons;