diff --git a/webmail/webmail.js b/webmail/webmail.js index 4535659..deb358e 100644 --- a/webmail/webmail.js +++ b/webmail/webmail.js @@ -1679,6 +1679,7 @@ let rejectsMailbox = ''; // Last known server version. For asking to reload. let lastServerVersion = ''; const login = async (reason) => { + popupOpen = true; // Prevent global key event handler from consuming keys. return new Promise((resolve, _) => { const origFocus = document.activeElement; let reasonElem; @@ -1716,6 +1717,7 @@ const login = async (reason) => { if (origFocus && origFocus instanceof HTMLElement && origFocus.parentNode) { origFocus.focus(); } + popupOpen = false; resolve(token); } catch (err) { diff --git a/webmail/webmail.ts b/webmail/webmail.ts index 3c24cdd..29b7d43 100644 --- a/webmail/webmail.ts +++ b/webmail/webmail.ts @@ -262,6 +262,7 @@ let rejectsMailbox: string = '' let lastServerVersion: string = '' const login = async (reason: string) => { + popupOpen = true // Prevent global key event handler from consuming keys. return new Promise((resolve: (v: string) => void, _) => { const origFocus = document.activeElement let reasonElem: HTMLElement @@ -308,6 +309,7 @@ const login = async (reason: string) => { if (origFocus && origFocus instanceof HTMLElement && origFocus.parentNode) { origFocus.focus() } + popupOpen = false resolve(token) } catch (err) { console.log('login error', err)