1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-12-25 00:48:51 -05:00

Set focus state in right place

This commit is contained in:
Lance Stout 2013-09-17 11:05:01 -07:00
parent e44d956c42
commit 01692f31f3

View File

@ -26,10 +26,10 @@ module.exports = {
app.hasFocus = false; app.hasFocus = false;
$(window).blur(function () { $(window).blur(function () {
me.hasFocus = false; app.hasFocus = false;
}); });
$(window).focus(function () { $(window).focus(function () {
me.hasFocus = true; app.hasFocus = true;
}); });
window.onbeforeunload = function () { window.onbeforeunload = function () {
if (client.sessionStarted) { if (client.sessionStarted) {