diff options
Diffstat (limited to 'src/client/Main.hx')
| -rw-r--r-- | src/client/Main.hx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx index 9a4c809..d3d1ce2 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -117,7 +117,10 @@ class Main { document.addEventListener("click", onFirstInteraction); window.addEventListener("beforeunload", () -> isPageUnloading = true); - window.addEventListener("blur", () -> isPageVisible = false); + window.addEventListener("blur", () -> { + if (document.activeElement?.tagName == "IFRAME") return; + isPageVisible = false; + }); window.addEventListener("focus", () -> isPageVisible = true); document.addEventListener("visibilitychange", () -> { isPageVisible = document.visibilityState == VISIBLE; |
