fix: add type="submit" to forgot password form button#4910
Conversation
The "Send reset email" button was missing type="submit", preventing form submission when clicked. All other auth forms (sign-in, sign-up, OTP) already have this attribute set correctly. Closes QuantumNous#4793
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe forgot-password form's submit button now explicitly declares ChangesForm Submission Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Calcium-Ion
left a comment
There was a problem hiding this comment.
Approving. Minimal 1-line type="submit" addition restores the existing react-hook-form onSubmit on web/default/src/features/auth/forgot-password/components/forgot-password-form.tsx. Pattern matches the other auth forms in this directory. Fixes #4793.
Note: #4794 applies the same one-line fix and will be closed as duplicate in favor of this PR.
The "Send reset email" button was missing type="submit", preventing form submission when clicked. All other auth forms (sign-in, sign-up, OTP) already have this attribute set correctly. Closes QuantumNous#4793
The "Send reset email" button was missing type="submit", preventing form submission when clicked. All other auth forms (sign-in, sign-up, OTP) already have this attribute set correctly. Closes QuantumNous#4793
The "Send reset email" button was missing type="submit", preventing form submission when clicked. All other auth forms (sign-in, sign-up, OTP) already have this attribute set correctly. Closes QuantumNous#4793
The "Send reset email" button was missing type="submit", preventing form submission when clicked. All other auth forms (sign-in, sign-up, OTP) already have this attribute set correctly. Closes QuantumNous#4793
Summary
type="submit"to the primary "Send reset email"<Button>in the forgot password form, enabling form submission when the button is clicked.Closes #4793
Root Cause
The
<Button>component defaults totype="button", which does not trigger form submission. Since the<form>element usesonSubmit={form.handleSubmit(onSubmit)}, clicking the button withouttype="submit"fires a click event but never invokes the form's submit handler.Test Plan
/forgot-password, enter email, click "Send reset email", verify XHR request fires and success toast appearsSummary by CodeRabbit