fix: resolve input focus on entire input field#325
fix: resolve input focus on entire input field#325ankurkrgupta22122006-oss wants to merge 1 commit into
Conversation
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. Formatting and Branching
|
jagdish-15
left a comment
There was a problem hiding this comment.
I've checked the implementation locally, and I don't think this resolves the issue yet.
The main problem isn't the cursor styling, the <input> already displays a text cursor by default, so adding cursor: text doesn't change the behavior.
The actual issue is that clicks on the padded area are received by the parent container rather than the <input> itself. While you've added the focus logic, it's currently placed inside fullResetForm(), which only runs after clicking "Register Another". As a result, the focus behavior is still missing on the initial page load, which is when the bug occurs.
Could you move the event delegation so it's initialized on the initial page load (rather than inside fullResetForm()), ensuring the focus behavior works from the moment the page loads? Also, please fix the failing Prettier check before requesting another review.
Once those changes are made, I'd be happy to take another look.
Pull Request Description
#why this needed
Users were able to click the text area of the input, but the padded corner area did not always focus the field. This makes the form less consistent.
Linked Issue
Fixes #322
Changes Made
Type of Change
-[ ]Bug fix
-[ ]New feature
-[✓] UI/Visual update
[] Documentation update
-[ ]Refactor
Testing
[ ✓] Tested locally
Tested on mobile viewport (if applicable)
[✓ ] No console errors introduced
Checklist
[✓ ] My code follows the project's coding style
[✓ ] I have formatted my code locally by running npx prettier --write . before submitting
[ ✓] I am submitting my PR from a dedicated feature/* branch, not the main branch
[✓ ] I have performed a self-review of my code
[ ✓] My changes generate no new warnings or errors
[✓ ] I have updated documentation if required
[ ✓] I have linked the relevant issue
Notes: