mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-03 14:19:19 +00:00
gh-13016: Fixed pinned tabs not being able to collapse (gh-13018)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
|
||||
index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938d6923f3e 100644
|
||||
index 3ca119e8dc72fac652c98505211864483d98add2..b65307ee8df896488a4c51e3a25bf9ad9e1c8179 100644
|
||||
--- a/browser/components/tabbrowser/content/tabgroup.js
|
||||
+++ b/browser/components/tabbrowser/content/tabgroup.js
|
||||
@@ -14,11 +14,11 @@
|
||||
@@ -101,7 +101,13 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
|
||||
resetDefaultGroupName = () => {
|
||||
this.#defaultGroupName = "";
|
||||
@@ -178,7 +201,9 @@
|
||||
@@ -175,10 +198,15 @@
|
||||
if (!this.#tabChangeObserver) {
|
||||
this.#tabChangeObserver = new window.MutationObserver(mutations => {
|
||||
if (!this.tabs.length) {
|
||||
+ if (this.tagName === "zen-workspace-collapsible-pins") {
|
||||
+ return;
|
||||
+ }
|
||||
this.dispatchEvent(
|
||||
new CustomEvent("TabGroupRemoved", { bubbles: true })
|
||||
);
|
||||
@@ -111,7 +117,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
Services.obs.notifyObservers(
|
||||
this,
|
||||
"browser-tabgroup-removed-from-dom"
|
||||
@@ -223,7 +248,10 @@
|
||||
@@ -223,7 +251,10 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -123,7 +129,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
}
|
||||
|
||||
get color() {
|
||||
@@ -317,6 +345,9 @@
|
||||
@@ -317,6 +348,9 @@
|
||||
}
|
||||
|
||||
set collapsed(val) {
|
||||
@@ -133,7 +139,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
if (!!val == this.collapsed) {
|
||||
return;
|
||||
}
|
||||
@@ -403,7 +434,6 @@
|
||||
@@ -403,7 +437,6 @@
|
||||
tabGroupName,
|
||||
})
|
||||
.then(result => {
|
||||
@@ -141,7 +147,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
});
|
||||
}
|
||||
|
||||
@@ -478,13 +508,65 @@
|
||||
@@ -478,13 +511,65 @@
|
||||
* @returns {MozTabbrowserTab[]}
|
||||
*/
|
||||
get tabs() {
|
||||
@@ -212,7 +218,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -592,7 +674,6 @@
|
||||
@@ -592,7 +677,6 @@
|
||||
);
|
||||
} else {
|
||||
if (tabOrSplitView.pinned) {
|
||||
@@ -220,7 +226,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
}
|
||||
let tabToMove =
|
||||
this.ownerGlobal === tabOrSplitView.ownerGlobal
|
||||
@@ -661,7 +742,7 @@
|
||||
@@ -661,7 +745,7 @@
|
||||
*/
|
||||
on_click(event) {
|
||||
let isToggleElement =
|
||||
@@ -229,7 +235,7 @@ index 3ca119e8dc72fac652c98505211864483d98add2..026b524be51170882e788a701095b938
|
||||
event.target === this.#overflowCountLabel;
|
||||
if (isToggleElement && event.button === 0) {
|
||||
event.preventDefault();
|
||||
@@ -740,5 +821,6 @@
|
||||
@@ -740,5 +824,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user