fix: Fixed 'new tab below' opening tabs on the pinned section, b=no-bug, c=common

This commit is contained in:
mr. m
2025-09-23 14:03:09 +02:00
parent db2ba602a8
commit 11e385e1c4
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 3204f253c23551650991d3385dd256d55892a012..29e0471616f979bfe40bb4d34148bf35a63f59ee 100644
index 3204f253c23551650991d3385dd256d55892a012..792e54079e9f82013617306243fe313c1ee4358d 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -427,15 +427,64 @@
@@ -481,7 +481,7 @@ index 3204f253c23551650991d3385dd256d55892a012..29e0471616f979bfe40bb4d34148bf35
+ index = Math.min(index, tab.hasAttribute("zen-essential") ? this._numZenEssentials : this._numVisiblePinTabsWithoutCollapsed);
} else {
- index = Math.max(index, this.pinnedTabCount);
+ index = Math.max(index, this._numVisiblePinTabsWithoutCollapsed);
+ index = Math.max(index, typeof elementIndex == "number" ? this._numVisiblePinTabsWithoutCollapsed : this.pinnedTabCount);
index = Math.min(index, allItems.length);
}
/** @type {MozTabbrowserTab|undefined} */