Bug 1908416: gBrowser.visibleTabs handles tab groups r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218796
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
this.addEventListener("TabUnpinned", this);
|
||||
this.addEventListener("TabHoverStart", this);
|
||||
this.addEventListener("TabHoverEnd", this);
|
||||
this.addEventListener("TabGroupExpand", this);
|
||||
this.addEventListener("TabGroupCollapse", this);
|
||||
this.addEventListener("transitionend", this);
|
||||
this.addEventListener("dblclick", this);
|
||||
this.addEventListener("click", this);
|
||||
@@ -215,6 +217,14 @@
|
||||
this._previewPanel?.deactivate(event.target);
|
||||
}
|
||||
|
||||
on_TabGroupExpand() {
|
||||
this._invalidateCachedVisibleTabs();
|
||||
}
|
||||
|
||||
on_TabGroupCollapse() {
|
||||
this._invalidateCachedVisibleTabs();
|
||||
}
|
||||
|
||||
on_transitionend(event) {
|
||||
if (event.propertyName != "max-width") {
|
||||
return;
|
||||
@@ -1163,7 +1173,7 @@
|
||||
if (!this._visibleTabs) {
|
||||
this._visibleTabs = Array.prototype.filter.call(
|
||||
this.allTabs,
|
||||
tab => !tab.hidden && !tab.closing
|
||||
tab => !tab.hidden && !tab.closing && !tab.group?.collapsed
|
||||
);
|
||||
}
|
||||
return this._visibleTabs;
|
||||
|
||||
Reference in New Issue
Block a user