mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-07 05:47:19 +00:00
gh-15244: Fixed creatin a new space not selecting the empty tab (gh-15245)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
// Windows defaults to 8px
|
||||
document.documentElement.style.setProperty(
|
||||
"--zen-border-radius",
|
||||
"8px"
|
||||
"9px"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user