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

@@ -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 &&