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:
parent
e44d956c42
commit
01692f31f3
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user