From 4fdc300b61ebc3d36c3f5a511df92248453f8d55 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Fri, 17 Apr 2020 23:09:55 +0300 Subject: [PATCH] disable root frame popup when iframe is fullscreen --- ext/fg/js/frontend-initialize.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js index 2b942258..83c0e606 100644 --- a/ext/fg/js/frontend-initialize.js +++ b/ext/fg/js/frontend-initialize.js @@ -88,7 +88,7 @@ async function main() { } let popup; - if (isIframe && options.general.showIframePopupsInRootFrame) { + if (isIframe && options.general.showIframePopupsInRootFrame && !document.fullscreen) { popup = popups.iframe || await createIframePopupProxy(url, frameOffsetForwarder); popups.iframe = popup; } else if (proxy) { @@ -117,6 +117,7 @@ async function main() { }; yomichan.on('optionsUpdated', applyOptions); + window.addEventListener('fullscreenchange', applyOptions, false); await applyOptions(); }