File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed
packages/ui/src/components
SessionTasks/tasks/TaskResetPassword Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/ui ' : patch
3+ ---
4+
5+ Fix issue where the reset password form could be submitted via the enter key even when the confirmation password didn't match.
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ const TaskResetPasswordInternal = () => {
7575
7676 const resetPassword = ( ) => {
7777 return card . runAsync ( async ( ) => {
78- if ( ! clerk . user ) {
78+ if ( ! canSubmit || ! clerk . user ) {
7979 return ;
8080 }
8181
Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ const ResetPasswordInternal = () => {
7171 } ;
7272
7373 const resetPassword = async ( ) => {
74+ if ( ! canSubmit ) {
75+ return ;
76+ }
77+
7478 passwordField . clearFeedback ( ) ;
7579 confirmField . clearFeedback ( ) ;
7680 try {
Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ export const PasswordForm = withCardStateProvider((props: PasswordFormProps) =>
108108 } ;
109109
110110 const updatePassword = async ( ) => {
111+ if ( ! canSubmit ) {
112+ return ;
113+ }
114+
111115 try {
112116 successPagePropsRef . current = {
113117 title : user . passwordEnabled
You can’t perform that action at this time.
0 commit comments