From b3b6e7f33db06322e83e81b2771566d2af8c719d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 4 Sep 2026 14:18:38 -0400 Subject: [PATCH] Reopen closed reader and note tabs at their original position The undo-close hooks read the index from the wrong object, so reopened reader and note tabs were always appended at the end. --- chrome/content/zotero/tabs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index e04ebe658d..8a1330b7c0 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -202,12 +202,12 @@ var Zotero_Tabs = new function () { } }, undoClose: { - reader: async (tab, _tabIndex) => { + reader: async (tab, tabIndex) => { if (Zotero.Items.exists(tab.data.itemID)) { await Zotero.Reader.open(tab.data.itemID, null, { - tabIndex: tab.index, + tabIndex, openInBackground: true, allowDuplicate: true } @@ -216,12 +216,12 @@ var Zotero_Tabs = new function () { } return false; }, - note: async (tab, _tabIndex) => { + note: async (tab, tabIndex) => { if (Zotero.Items.exists(tab.data.itemID)) { await Zotero.Notes.open(tab.data.itemID, null, { - tabIndex: tab.index, + tabIndex, openInBackground: true, allowDuplicate: true }