From d00df353d83ff1755782b96ce9f72e748b72f949 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Fri, 24 Feb 2023 11:31:26 -0500 Subject: [PATCH] fixup number-only event verifier to allow enter --- tfweb/src/routes/auth/mfa/+page.svelte | 1 + tfweb/src/routes/auth/mfasetup/+page.svelte | 1 + 2 files changed, 2 insertions(+) diff --git a/tfweb/src/routes/auth/mfa/+page.svelte b/tfweb/src/routes/auth/mfa/+page.svelte index 92b1e2a..f300bd3 100644 --- a/tfweb/src/routes/auth/mfa/+page.svelte +++ b/tfweb/src/routes/auth/mfa/+page.svelte @@ -69,6 +69,7 @@ } function validateKeypress(e: KeyboardEvent) { + if (e.charCode === 13) { return; } if (e.charCode < 47 || e.charCode > 57) { e.preventDefault(); } diff --git a/tfweb/src/routes/auth/mfasetup/+page.svelte b/tfweb/src/routes/auth/mfasetup/+page.svelte index 1737cf2..070f83a 100644 --- a/tfweb/src/routes/auth/mfasetup/+page.svelte +++ b/tfweb/src/routes/auth/mfasetup/+page.svelte @@ -67,6 +67,7 @@ }); function validateInput(e: KeyboardEvent) { + if (e.charCode === 13) { return; } if (e.charCode < 47 || e.charCode > 57) { e.preventDefault(); }