From ef4085de6e843f3a4c734b500eeb29e5077090df Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Wed, 24 Sep 2025 12:00:40 +0330 Subject: [PATCH] fix: submit with enter in enter password form --- .../AuthenticationSteps/EnterPasswordForm.tsx | 114 ++++++++++-------- 1 file changed, 63 insertions(+), 51 deletions(-) diff --git a/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx b/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx index 1c03e69..46f23f7 100644 --- a/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx +++ b/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx @@ -142,61 +142,73 @@ export const EnterPasswordForm = ({ - - - {t('enterPassword.enterThePasswordYouSetForYourAccount')} - - - setPassValue(e.target.value)} - onBlur={handleBlur} - error={!passValue && inputTouched} - helperText={ - !passValue && inputTouched ? t('loginForm.thisFieldIsRequired') : '' - } - autoFocus - slotProps={{ - htmlInput: { sx: { lineHeight: 1.5 } }, - input: { - endAdornment: ( - setShowPassword(!showPassword)} - > - {showPassword ? ( - - ) : ( - - )} - - ), - }, + { + e.preventDefault(); + e.stopPropagation(); + if (!loginWithPassLoading) { + void handleSubmit(); + } }} - sx={{ my: 4 }} - /> - - + + {t('enterPassword.enterThePasswordYouSetForYourAccount')} + - - - - - - + + + + + + + + ); };