fix(gui): defer login event until listener registered (#2547)

Fixes an error introduced in 4b8c46e where the page load is attempted to
be triggered by dispatching the login event, however the listener which
handles loading the page has not yet been registered.
This commit is contained in:
Eric Dubé
2026-02-25 14:22:06 -05:00
committed by GitHub
parent 7a1468d070
commit c4346df24e
+6 -1
View File
@@ -1077,7 +1077,7 @@ window.initgui = async function (options) {
});
}
if ( !reload_on_success && window.is_auth() ) {
document.dispatchEvent(new Event('login', { bubbles: true }));
window.__login_completed = true;
}
}
@@ -1577,6 +1577,11 @@ window.initgui = async function (options) {
});
if ( window.__login_completed ) {
document.dispatchEvent(new Event('login', { bubbles: true }));
window.__login_completed = false;
}
$('.popover, .context-menu').on('remove', function () {
$('.window-active .window-app-iframe').css('pointer-events', 'all');
});