Fix regression that prevents showing the last selected tab on startup
Fixes #2723
This commit is contained in:
parent
a396771cbc
commit
e1997620a4
1 changed files with 17 additions and 6 deletions
|
@ -128,12 +128,23 @@ var Zotero_Tabs = new function () {
|
||||||
}
|
}
|
||||||
else if (tab.type === 'reader') {
|
else if (tab.type === 'reader') {
|
||||||
if (Zotero.Items.exists(tab.data.itemID)) {
|
if (Zotero.Items.exists(tab.data.itemID)) {
|
||||||
this.add({
|
if (tab.selected) {
|
||||||
type: 'reader-unloaded',
|
Zotero.Reader.open(tab.data.itemID,
|
||||||
title: tab.title,
|
null,
|
||||||
index: i,
|
{
|
||||||
data: tab.data
|
title: tab.title,
|
||||||
});
|
openInBackground: !tab.selected
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.add({
|
||||||
|
type: 'reader-unloaded',
|
||||||
|
title: tab.title,
|
||||||
|
index: i,
|
||||||
|
data: tab.data
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue