Skip to content

Commit

Permalink
Fix crash switching from Notes tab to feed item
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Jul 27, 2017
1 parent c110e64 commit 72fbee5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions chrome/content/zotero/itemPane.js
Expand Up @@ -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);

Expand Down
6 changes: 6 additions & 0 deletions chrome/content/zotero/zoteroPane.js
Expand Up @@ -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;

Expand Down

0 comments on commit 72fbee5

Please sign in to comment.