mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1793829 - Don't steal focus for navigations without user activation. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D158758
This commit is contained in:
parent
f71c987669
commit
d798a8796a
@ -9223,7 +9223,9 @@ static bool NavigationShouldTakeFocus(nsDocShell* aDocShell,
|
||||
if (!aLoadState->AllowFocusMove()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!aLoadState->HasValidUserGestureActivation()) {
|
||||
return false;
|
||||
}
|
||||
const auto& sourceBC = aLoadState->SourceBrowsingContext();
|
||||
if (!sourceBC || !sourceBC->IsActive()) {
|
||||
// If the navigation didn't come from a foreground tab, then we don't steal
|
||||
|
Loading…
Reference in New Issue
Block a user