Closed petewins closed 3 months ago
Can you check if it works for you in 2.10.11?
I've updated the codesandbox to 2.10.11 and it still seems to have that issue
Oh yes, you're right. I haven't accounted for the use case when you use Button with a custom onClick that also submits the form natively
Added that part in 2.10.12 as well
Thank you @blvdmitry, tested in 2.10.12 🔥
Describe the bug
Hi, I came across this problem when trying to submit a form using the keyboard
Button with type="submit" does not submit form when using keyboard
To Reproduce
enter
orspace
keyhttps://codesandbox.io/p/devbox/reshaped-button-on-enter-key-does-not-submit-form-8sprjr?file=%2Fapp%2Fpage.tsx%3A14%2C27
Expected behavior Expect the form to submit. It looks like the button's onclick event is firing as expected but not the forms.
I'm not sure what the standards are for type="submit" button but I expect it to behave the same as a native html button