diff options
| author | RblSb <msrblsb@gmail.com> | 2025-05-02 17:17:00 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-05-02 17:17:00 +0300 |
| commit | 4b48de4f824ce48f1466014a9e9aa24023212181 (patch) | |
| tree | e1b52ce890f059bff3ca33e5ddcee07d1f51ec63 /res | |
| parent | 047a2b3d175cd836d2abc2c5e80371b13bb0a6cc (diff) | |
Ignore window.onblur for iframe clicks
closes #63
Diffstat (limited to 'res')
| -rw-r--r-- | res/client.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/res/client.js b/res/client.js index 5c52461..ba579ba 100644 --- a/res/client.js +++ b/res/client.js @@ -1399,7 +1399,11 @@ var client_Main = function() { return _gthis.isPageUnloading = true; }); window.addEventListener("blur",function() { - return _gthis.isPageVisible = false; + var tmp = window.document.activeElement; + if((tmp != null ? tmp.tagName : null) == "IFRAME") { + return; + } + _gthis.isPageVisible = false; }); window.addEventListener("focus",function() { return _gthis.isPageVisible = true; @@ -1744,7 +1748,7 @@ client_Main.prototype = { var data = JSON.parse(e.data); if(this.config != null && this.config.isVerbose) { var t = data.type; - haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 486, className : "client.Main", methodName : "onMessage", customParams : [Reflect.field(data,t.charAt(0).toLowerCase() + HxOverrides.substr(t,1,null))]}); + haxe_Log.trace("Event: " + data.type,{ fileName : "src/client/Main.hx", lineNumber : 489, className : "client.Main", methodName : "onMessage", customParams : [Reflect.field(data,t.charAt(0).toLowerCase() + HxOverrides.substr(t,1,null))]}); } client_JsApi.fireEvents(data); switch(data.type) { |
