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
The text was updated successfully, but these errors were encountered:
ashleyryan
changed the title
React: Pressing enter on a form input fails to submit the form
React: Pressing enter in a form input fails to submit the form
Sep 8, 2022
This looks like a regression as it was previously fixed here vmware-archive/clarity#6263 but the code in button.base.ts has changed significantly since that.
Describe the bug
When using a plain input type="submit", hitting enter in a form field submits the form. When using a cds-button with type="submit", it does not.
How to reproduce
I believe this is a react only issue, as the form is submitted with a plain web component
react: https://stackblitz.com/edit/clarity-react-demo-wkfrre?file=src%2FApp.tsx
vanilla js: https://stackblitz.com/edit/clarity-react-demo-wkfrre?file=src/App.tsx
Steps to reproduce the behavior:
Expected behavior
The form should submit
Versions
Clarity Core version:
Framework:
The text was updated successfully, but these errors were encountered: