From e0617153155f43337296101719a4a3334c1795e7 Mon Sep 17 00:00:00 2001 From: G r e y Date: Fri, 13 May 2022 20:07:54 -0400 Subject: [PATCH] fix: error when clicking on login screen (#1445) Resolves: #1435 --- site/src/components/SignInForm/SignInForm.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/src/components/SignInForm/SignInForm.tsx b/site/src/components/SignInForm/SignInForm.tsx index ab528ebf94..0f76d7c5a3 100644 --- a/site/src/components/SignInForm/SignInForm.tsx +++ b/site/src/components/SignInForm/SignInForm.tsx @@ -76,6 +76,11 @@ export const SignInForm: React.FC = ({ password: "", }, validationSchema, + // The email field has an autoFocus, but users may login with a button click. + // This is set to `false` in order to keep the autoFocus, validateOnChange + // and Formik experience friendly. Validation will kick in onChange (any + // field), or after a submission attempt. + validateOnBlur: false, onSubmit, }) const getFieldHelpers = getFormHelpers(form)