Fix recovery-codes dialog not appearing in Safari after 2FA setup (v0.11.119)

This commit is contained in:
marvin
2026-09-16 17:56:30 -04:00
parent 5417d5eeed
commit e0463525ef
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -788,7 +788,7 @@ $("#mfa-setup-confirm-form").addEventListener("submit", async event => {
state.user.mfaEnabled = true;
renderAccount();
$("#mfa-recovery-codes").textContent = result.recoveryCodes.join("\n");
$("#mfa-recovery-dialog").showModal();
requestAnimationFrame(() => $("#mfa-recovery-dialog").showModal());
toast("Two-factor authentication enabled.");
} catch (error) { $("#mfa-setup-error").textContent = error.message; }
});
@@ -812,7 +812,7 @@ $("#account-mfa-recovery").addEventListener("click", async () => {
try {
const result = await api("/api/account/mfa/recovery-codes", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ password }) });
$("#mfa-recovery-codes").textContent = result.recoveryCodes.join("\n");
$("#mfa-recovery-dialog").showModal();
requestAnimationFrame(() => $("#mfa-recovery-dialog").showModal());
toast("Recovery codes regenerated. Your old codes no longer work.");
} catch (error) { toast(error.message, "error"); }
});