mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-12-23 16:18:48 -05:00
Set focus state in right place
This commit is contained in:
parent
e44d956c42
commit
01692f31f3
@ -26,10 +26,10 @@ module.exports = {
|
||||
|
||||
app.hasFocus = false;
|
||||
$(window).blur(function () {
|
||||
me.hasFocus = false;
|
||||
app.hasFocus = false;
|
||||
});
|
||||
$(window).focus(function () {
|
||||
me.hasFocus = true;
|
||||
app.hasFocus = true;
|
||||
});
|
||||
window.onbeforeunload = function () {
|
||||
if (client.sessionStarted) {
|
||||
|
Loading…
Reference in New Issue
Block a user