aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Main.hx5
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;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage