From 9550c68d7a2f369b0b8800359142abd620b4c74e 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') 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