Update web/assets/login-events.js
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
This commit is contained in:
parent
5bc7b5ef0a
commit
3eaee9c9e3
|
@ -36,6 +36,7 @@ evtSource.addEventListener('success', (e) => {
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
window.location.replace(redirectTo);
|
window.location.replace(redirectTo);
|
||||||
} else {
|
} else {
|
||||||
|
// wait for the browser to be back in focus and redirect then
|
||||||
window.addEventListener('focus', () => {
|
window.addEventListener('focus', () => {
|
||||||
window.location.replace(redirectTo);
|
window.location.replace(redirectTo);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue