Fix crash switching from Notes tab to feed item
This commit is contained in:
parent
c110e64293
commit
72fbee5523
2 changed files with 6 additions and 5 deletions
|
@ -98,11 +98,6 @@ var ZoteroItemPane = new function() {
|
||||||
var viewBox = document.getElementById('zotero-view-item');
|
var viewBox = document.getElementById('zotero-view-item');
|
||||||
viewBox.classList.remove('no-tabs');
|
viewBox.classList.remove('no-tabs');
|
||||||
|
|
||||||
// Switch to info pane for feed items
|
|
||||||
if (item.isFeedItem) {
|
|
||||||
index = viewBox.selectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
document.getElementById('zotero-editpane-tabs').setAttribute('hidden', item.isFeedItem);
|
document.getElementById('zotero-editpane-tabs').setAttribute('hidden', item.isFeedItem);
|
||||||
|
|
||||||
|
|
|
@ -1472,6 +1472,12 @@ var ZoteroPane = new function()
|
||||||
|
|
||||||
document.getElementById('zotero-item-pane-content').selectedIndex = 1;
|
document.getElementById('zotero-item-pane-content').selectedIndex = 1;
|
||||||
var tabBox = document.getElementById('zotero-view-tabbox');
|
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;
|
var pane = tabBox.selectedIndex;
|
||||||
tabBox.firstChild.hidden = isCommons;
|
tabBox.firstChild.hidden = isCommons;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue