gh-15244: Fixed creatin a new space not selecting the empty tab (gh-15245)

This commit is contained in:
mr. m
2026-09-05 20:25:24 +02:00
committed by GitHub
parent 4f3bcb2f32
commit 58e83c137f
3 changed files with 7 additions and 9 deletions

View File

@@ -220,7 +220,7 @@
--zen-squircle-value: 1.3;
@media (-moz-platform: windows) {
--zen-squircle-value: 2.1;
--zen-squircle-value: 2.3;
}
--tab-icon-overlay-stroke: light-dark(white, black) !important;

View File

@@ -125,7 +125,7 @@
// Windows defaults to 8px
document.documentElement.style.setProperty(
"--zen-border-radius",
"8px"
"9px"
);
}
} else {

View File

@@ -2341,9 +2341,13 @@ class nsZenWorkspaces {
)
) {
tabToSelect = lastSelectedTab;
} else if (!onInit && !tabToSelect) {
// Create new tab if needed and no suitable tab was found
tabToSelect = this._emptyTab;
}
// Find first suitable tab
else {
// If we found a tab to select, select it
if (!tabToSelect || tabToSelect.closing) {
tabToSelect = gBrowser.visibleTabs.find(tab => !tab.pinned);
if (!tabToSelect && gBrowser.visibleTabs.length) {
tabToSelect = gBrowser.visibleTabs[gBrowser.visibleTabs.length - 1];
@@ -2354,12 +2358,6 @@ class nsZenWorkspaces {
}
}
// If we found a tab to select, select it
if (!onInit && !tabToSelect) {
// Create new tab if needed and no suitable tab was found
const newTab = this.selectEmptyTab();
tabToSelect = newTab;
}
if (tabToSelect && !onInit) {
tabToSelect._visuallySelected = true;
}