1
0
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:
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;
$(window).blur(function () {
me.hasFocus = false;
app.hasFocus = false;
});
$(window).focus(function () {
me.hasFocus = true;
app.hasFocus = true;
});
window.onbeforeunload = function () {
if (client.sessionStarted) {