diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index 9a18cc917c..3005a62196 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -337,7 +337,7 @@ var Zotero_Tabs = new function () { * @param {String} id * @param {Boolean} reopening */ - this.select = function (id, reopening) { + this.select = function (id, reopening, options) { var { tab, tabIndex } = this._getTab(id); if (!tab || tab.id === this._selectedID) { return; @@ -348,7 +348,7 @@ var Zotero_Tabs = new function () { } if (tab.type === 'reader-unloaded') { this.close(tab.id); - Zotero.Reader.open(tab.data.itemID, null, { + Zotero.Reader.open(tab.data.itemID, options && options.location, { tabID: tab.id, title: tab.title, tabIndex, diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 7918107694..5e528ad160 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -1376,7 +1376,7 @@ class Reader { if (win) { let existingTabID = win.Zotero_Tabs.getTabIDByItemID(itemID); if (existingTabID) { - win.Zotero_Tabs.select(existingTabID); + win.Zotero_Tabs.select(existingTabID, false, { location }); return; } }