From bb85e11a928aef4ad6c6c3d8dd878f910fdf41f7 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Tue, 6 Jun 2023 19:42:34 +0300 Subject: [PATCH] Fix tab selection when closing a tab nearby Fixes #3151 --- chrome/content/zotero/tabs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index fdc0d50403..2cc707dc9b 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -273,6 +273,8 @@ var Zotero_Tabs = new function () { } this._tabs.splice(tabIndex, 1); document.getElementById(tab.id).remove(); + // For unknown reason fx102, unlike 60, sometimes doesn't automatically update selected index + this.deck.selectedIndex = Array.from(this.deck.children).findIndex(x => x.id == this._selectedID); if (tab.onClose) { tab.onClose(); }