Merge pull request #6185 from noaione/privatebrowsing-newtab-fix

Pass new tab URL to Zen `selectEmptyTab`
This commit is contained in:
mr. m
2025-03-08 19:01:10 +01:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -111,12 +111,13 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
);
}
selectEmptyTab() {
selectEmptyTab(newTabTarget = null) {
if (this._emptyTab && gZenVerticalTabsManager._canReplaceNewTab) {
gBrowser.selectedTab = this._emptyTab;
return this._emptyTab;
}
let tab = gZenUIManager.openAndChangeToTab(Services.prefs.getStringPref('browser.startup.homepage'));
const newTabUrl = newTabTarget || Services.prefs.getStringPref('browser.startup.homepage');
let tab = gZenUIManager.openAndChangeToTab(newTabUrl);
if (window.uuid) {
tab.setAttribute('zen-workspace-id', this.activeWorkspace);
}