[DOM] Make sure to exit fullscreen mode if popups are opened or focused.

This commit is contained in:
wolfbeast 2020-03-18 21:15:10 +01:00 committed by Roy Tam
commit 41bd0de230
2 changed files with 15 additions and 0 deletions

View file

@ -1297,6 +1297,12 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent,
}
}
// If a website opens a popup exit DOM fullscreen
if (windowIsNew && aCalledFromJS && !hasChromeParent && !isCallerChrome &&
parentWindow) {
nsIDocument::AsyncExitFullscreen(parentWindow->GetDoc());
}
if (aForceNoOpener && windowIsNew) {
NS_RELEASE(*aResult);
}