Update web/assets/login-events.js

Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
This commit is contained in:
André Staltz 2021-04-11 18:56:05 +03:00 committed by cblgh
parent 02a1f8ab5b
commit 5bc7b5ef0a
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ evtSource.addEventListener('failed', (e) => {
console.error(e.data);
});
// prepare for the case that the success event happens while the browser is not on screen.
let hasFocus = true;
window.addEventListener('blur', () => {
hasFocus = false;