From de0afdf60b0a0c29d45d9381f722c8e5dacca97e Mon Sep 17 00:00:00 2001 From: G r e y Date: Fri, 13 May 2022 23:19:01 +0000 Subject: [PATCH] fix: error when clicking on login screen 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 ab528ebf943c7..0f76d7c5a3e91 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)