aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Main.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2025-05-02 17:17:00 +0300
committerRblSb <msrblsb@gmail.com>2025-05-02 17:17:00 +0300
commit4b48de4f824ce48f1466014a9e9aa24023212181 (patch)
treee1b52ce890f059bff3ca33e5ddcee07d1f51ec63 /src/client/Main.hx
parent047a2b3d175cd836d2abc2c5e80371b13bb0a6cc (diff)
Ignore window.onblur for iframe clicks
closes #63
Diffstat (limited to 'src/client/Main.hx')
-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