Open ashleyryan opened 2 years ago
I am observing the same issue in an Angular app.
This works: <button type="submit">Submit</button>
This does not: <cds-button type="submit">Login</cds-button>
I wonder if I miss something obvious here are as this is rather basic behavior.
This looks like a regression as it was previously fixed here https://github.com/vmware/clarity/issues/6263 but the code in button.base.ts
has changed significantly since that.
If it's any help, I've a Stackblitz of an Angular demo https://stackblitz.com/edit/cds-button-submit?file=src/app/app.component.ts
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: