mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-01 13:21:54 +00:00
fix: Fixed auto focus not working on popup windows, b=closes #11377, c=common, workspaces
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user