Bug 1691214 - Take focus from window.open etc even if we're already active. r=hsivonen

With multiple windows, being active doesn't guarantee being in the
foreground window.

Differential Revision: https://phabricator.services.mozilla.com/D104326
This commit is contained in:
Emilio Cobos Álvarez
2021-02-08 08:01:49 +00:00
parent 43083ec099
commit 16ef02f359
4 changed files with 46 additions and 1 deletions

View File

@@ -9180,7 +9180,6 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
const bool shouldTakeFocus =
aLoadState->SourceBrowsingContext() &&
aLoadState->SourceBrowsingContext()->IsActive() &&
!mBrowsingContext->IsActive() &&
!Preferences::GetBool("browser.tabs.loadDivertedInBackground", false);
mOriginalUriString.Truncate();