fix: Small fixes when cancelling new empty split view, b=no-bug, c=common, split-view, workspaces

This commit is contained in:
Mr. M
2025-09-22 23:08:11 +02:00
parent 5ac63e3b3b
commit ed492568e6
7 changed files with 44 additions and 5 deletions

View File

@@ -889,7 +889,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
removeGroup(groupIndex) {
const group = this._data[groupIndex];
for (const tab of group.tabs.reverse()) {
gBrowser.ungroupTab(tab);
if (tab.group?.hasAttribute('split-view-group')) {
gBrowser.ungroupTab(tab);
}
}
if (this.currentView === groupIndex) {
this.deactivateCurrentSplitView();
@@ -1951,7 +1953,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
const groupIndex = this._data.findIndex((group) => group.tabs.includes(emptyTab));
const newSelectedTab = gBrowser.selectedTab;
const cleanup = () => {
this.removeTabFromGroup(emptyTab, groupIndex, { changeTab: !onSwitch });
this.removeTabFromGroup(emptyTab, groupIndex, { changeTab: !onSwitch, forUnsplit: true });
const command = document.getElementById('cmd_zenNewEmptySplit');
command.removeAttribute('disabled');
};