From 3aae828871ac19c4b510a7213a6401b4d751f5ef Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 18 Mar 2020 21:15:10 +0100 Subject: [DOM] Make sure to exit fullscreen mode if popups are opened or focused. --- embedding/components/windowwatcher/nsWindowWatcher.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'embedding/components/windowwatcher') diff --git a/embedding/components/windowwatcher/nsWindowWatcher.cpp b/embedding/components/windowwatcher/nsWindowWatcher.cpp index 3732ea66d..fa23e285b 100644 --- a/embedding/components/windowwatcher/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp @@ -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); } -- cgit v1.2.3