From 46e2fdca00aab627010900527d48b57ca098f9c9 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 16 Apr 2025 12:25:23 +0200 Subject: [PATCH] fix: closes #6992 - Fixed url bar not being selected when selecting an empty tab, r=workspaces --- src/zen/workspaces/ZenWorkspaces.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index c5dd2bc07..24f85297e 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -112,6 +112,17 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { selectEmptyTab(newTabTarget = null) { if (this._emptyTab && gZenVerticalTabsManager._canReplaceNewTab) { + if (gBrowser.selectedTab !== this._emptyTab) { + window.addEventListener( + 'TabSelect', + () => { + setTimeout(() => { + gURLBar.select(); + }, 0); + }, + { once: true } + ); + } gBrowser.selectedTab = this._emptyTab; return this._emptyTab; }