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
Issue: userEvent.keyboard('{Enter}') does not trigger form submission when the form contains radio group elements.
Observation: Using fireEvent.submit successfully triggers form submission under the same conditions.
The text was updated successfully, but these errors were encountered:
We currently check if the form only contains one <input> element, as a second e.g. <input type="text"> disables this behavior in the browser, but e.g. a <select> does not affect it. Looks like any input element which isn't on the list is ignored as well. Can we confirm this? Is this defined in specs?
Reproduction example
https://stackblitz.com/edit/rtl-template-dg4qziej?file=src%2FApp.tsx
Prerequisites
userEvent.keyboard('{Enter}')
does trigger form submissionExpected behavior
userEvent.keyboard('{Enter}')
does trigger form submissionActual behavior
userEvent.keyboard('{Enter}')
does not trigger form submissionUser-event version
14.5.2
Environment
Testing Library framework: @testing-library/[email protected]
JS framework: [email protected]
Test environment: [email protected]
DOM implementation: [email protected]
Additional context
Issue:
userEvent.keyboard('{Enter}')
does not trigger form submission when the form contains radio group elements.Observation: Using
fireEvent.submit
successfully triggers form submission under the same conditions.The text was updated successfully, but these errors were encountered: