Fix focus detection
This commit is contained in:
@@ -10,6 +10,14 @@
|
|||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
|
|
||||||
|
var inboxFocused = false;
|
||||||
|
window.addEventListener('blur', function() {
|
||||||
|
inboxFocused = false;
|
||||||
|
});
|
||||||
|
window.addEventListener('focus', function() {
|
||||||
|
inboxFocused = true;
|
||||||
|
clearAttention();
|
||||||
|
});
|
||||||
window.isFocused = function() {
|
window.isFocused = function() {
|
||||||
return inboxFocused;
|
return inboxFocused;
|
||||||
};
|
};
|
||||||
@@ -39,7 +47,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Inbox window controller */
|
/* Inbox window controller */
|
||||||
var inboxFocused = false;
|
|
||||||
var inboxOpened = false;
|
var inboxOpened = false;
|
||||||
var inboxWindowId = 'inbox';
|
var inboxWindowId = 'inbox';
|
||||||
var appWindow = null;
|
var appWindow = null;
|
||||||
|
Reference in New Issue
Block a user