Reset button not considered during Implicit submission of a form
See original GitHub issueCurrent behavior:
Cypress doesn’t allow the user to implicitly submit the form with the {enter}
key if either:
- there is a
reset
button before thesubmit
button - there is a
reset
button but nosubmit
button.
All that happens is the form is cleared.
Desired behavior:
Form should submit when Enter key is pressed if there is a reset button present
Steps to reproduce: (app code and test code)
<form action="." method="GET">
<input name="search" id="search-field" type="text">
<button type="reset">Reset</button>
<button type="submit">Submit</button>
</form>
cy.get('#search-field').type('foo{enter}')
Versions
cypress 3.2.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Reset button is working before form submission but not after
Reset button is working fine before the form submission. Once the form is submitted, my View consists some values which got pre-populated. After...
Read more >Forms in HTML documents - W3C
A form may contain more than one submit button. reset buttons: When activated, a reset button resets all controls to their initial values....
Read more >The Enter Key should Submit Forms, Stop Suppressing it
When filling out a form, pressing enter in a textbox should submit the form. This is known as an implicit form submission. Despite...
Read more >A custom image for a reset button? - Jukka K. Korpela
Perhaps this is caused by the mistaken assumption that a reset button is an obligatory part of a form. More probably, authors just...
Read more >Reset and Cancel Buttons - Nielsen Norman Group
Reset can be useful for forms that satisfy both of the following criteria: ... Even if a user were to use a form...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in
3.3.2
.Hey @Bigdragon13th, thanks! I have a PR open for this situation also here that did not make it into 3.3.2 https://github.com/cypress-io/cypress/pull/4574