Bug 1700871 - Only allow focus move for links / form submission iff actually handling user input. r=smaug
The other navigation that allows focus moves (window.open) already goes through the popup blocker, so that one is fine. I think given how weird yet conservative other browsers are, this should be a good trade-off to avoid false positives. Differential Revision: https://phabricator.services.mozilla.com/D110196
This commit is contained in:
@@ -825,6 +825,7 @@ nsresult HTMLFormElement::SubmitSubmission(
|
||||
loadState->SetTriggeringPrincipal(NodePrincipal());
|
||||
loadState->SetPrincipalToInherit(NodePrincipal());
|
||||
loadState->SetCsp(GetCsp());
|
||||
loadState->SetAllowFocusMove(UserActivation::IsHandlingUserInput());
|
||||
|
||||
rv = nsDocShell::Cast(container)->OnLinkClickSync(this, loadState, false,
|
||||
NodePrincipal());
|
||||
|
||||
Reference in New Issue
Block a user