You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a react-router/remix application, using the useForm hook and parseWithZod, when submitting a form that gets validated in the server action using parseWithZod again, the page will reload when it's submitted by pressing the enter key instead of clicking the submit button, in Google chrome.
On other browsers (Firefox, safari, edge) the issue does not occur. Submitting by clicking the submit button also works fine in chrome. Tabbing the focus onto the submit button and then pressing the submit button using the enter key also works correctly.
The app fist behaves correctly, showing the success message, but then the page gets reloaded and resets the state of actionData, causing the success message to disappear.
Here's a codesandbox that shows the issue when opened in chrome and submitted by pressing the enter key:
Describe the bug and the expected behavior
In a react-router/remix application, using the useForm hook and parseWithZod, when submitting a form that gets validated in the server action using parseWithZod again, the page will reload when it's submitted by pressing the enter key instead of clicking the submit button, in Google chrome.
On other browsers (Firefox, safari, edge) the issue does not occur. Submitting by clicking the submit button also works fine in chrome. Tabbing the focus onto the submit button and then pressing the submit button using the enter key also works correctly.
The app fist behaves correctly, showing the success message, but then the page gets reloaded and resets the state of actionData, causing the success message to disappear.
Here's a codesandbox that shows the issue when opened in chrome and submitted by pressing the enter key:
https://codesandbox.io/p/devbox/jlqgdx
Conform version
v1.8.1
Steps to Reproduce the Bug or Issue
What browsers are you seeing the problem on?
Chrome
Screenshots or Videos
Faulty behavior in chrome:
Screen.Recording.2025-07-08.at.14.43.57.mov
Correct behavior in firefox:
Screen.Recording.2025-07-08.at.14.45.21.mov
Additional context
Versions as used in codesandbox:
React-router version: 7.1.5
Typescript version: 5.7.2
Zod version: 3.25.76
Google chrome version: 138.0.7204.93
OS version: Mac OS Sonoma 14.6.1