Update split view logic to check for 'zen-essential' attribute instead of pinned tabs

This commit is contained in:
mr. M 2025-02-27 00:30:12 +01:00
parent d6a1889e9f
commit 9fb2e9d30d
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..490762fa04b9d37d8d7dee3e8dc22e220fe02955 100644
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..fe746cd0e749308889173cbbb32b8a77a1dfe10f 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -412,11 +412,50 @@
@ -194,14 +194,19 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..490762fa04b9d37d8d7dee3e8dc22e22
// Additionally send pinned tab events
if (pinned) {
this._notifyPinnedStatus(t);
@@ -2918,6 +2982,7 @@
@@ -2918,9 +2982,10 @@
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
}
let group = this._createTabGroup(id, color, false, label);
- this.tabContainer.insertBefore(
+ group.pinned = tabs.some(tab => tab.pinned);
this.tabContainer.insertBefore(
+ (group.pinned ? this.verticalPinnedTabsContainer : this.tabContainer).insertBefore(
group,
insertBefore?.group ?? insertBefore
- insertBefore?.group ?? insertBefore
+ insertBefore?.group ?? tabs[tabs.length - 1].nextElementSibling
);
group.addTabs(tabs);
@@ -3367,6 +3432,24 @@
) {
tabWasReused = true;