fix: Fixed auto focus not working on popup windows, b=closes #11377, c=common, workspaces

This commit is contained in:
mr. m
2026-01-28 12:12:52 +01:00
parent 4de01a9bc9
commit 1176f5ac8b
2 changed files with 11 additions and 11 deletions

View File

@@ -87,7 +87,6 @@ class ZenStartup {
await delayedStartupPromise;
await SessionStore.promiseAllWindowsRestored;
delete gZenUIManager.promiseInitialized;
this.#initSearchBar();
gZenCompactModeManager.init();
// Fix for https://github.com/zen-browser/desktop/issues/7605, specially in compact mode
if (gURLBar.hasAttribute("breakout-extend")) {
@@ -154,11 +153,6 @@ class ZenStartup {
}
}
#initSearchBar() {
// Only focus the url bar
gURLBar.focus();
}
#checkForWelcomePage() {
if (!Services.prefs.getBoolPref("zen.welcome-screen.seen", false)) {
Services.prefs.setBoolPref("zen.welcome-screen.seen", true);

View File

@@ -1044,11 +1044,17 @@ class nsZenWorkspaces {
delete this._initialTab;
}
if (gZenVerticalTabsManager._canReplaceNewTab && showed) {
BrowserCommands.openTab();
} else if (!showed) {
gBrowser.selectedBrowser.focus();
}
// Wait for the next event loop to ensure that the startup focus logic by
// firefox has finished doing it's thing.
setTimeout(() => {
setTimeout(() => {
if (gZenVerticalTabsManager._canReplaceNewTab && showed) {
BrowserCommands.openTab();
} else if (!showed) {
gBrowser.selectedBrowser.focus();
}
});
});
if (
!gZenVerticalTabsManager._canReplaceNewTab &&