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:09 +03:00 committed by cblgh
parent 5bc7b5ef0a
commit 3eaee9c9e3
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ evtSource.addEventListener('success', (e) => {
if (hasFocus) {
window.location.replace(redirectTo);
} else {
// wait for the browser to be back in focus and redirect then
window.addEventListener('focus', () => {
window.location.replace(redirectTo);
});