question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

type('{enter}') doesn't work when only 1 input blocking implicit submission

See original GitHub issue

Current behavior:

I’ve already tried:

cy.get('input').eq(0).type('{enter}')

But it doesn’t work. I’ve also tried:

cy.get('input').eq(0).type('{enter}').trigger('input')

And:

cy.get('input').eq(0).type('{enter}').trigger('input').eq(0).
{uparrow},{downarrow},tab()

they’re all right.But ENTER isn’t.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cypress-bot[bot]commented, Jul 9, 2019

Released in 3.4.0.

0reactions
cypress-bot[bot]commented, Jul 9, 2019

The code for this is done in cypress-io/cypress#4574, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Form submitted implicitly even when there are other input ...
When you have a second input like <input id="itemid" type="hidden" /> you explicitly set the type to hidden, so it won't block submission....
Read more >
Implicit form submission doesn't work always
An implicit form submission is the action of just pressing the ENTER key when focussing an input element. It turns out that this...
Read more >
The Enter Key should Submit Forms, Stop Suppressing it
“If the form has no submit button, then the implicit submission mechanism must do nothing if the form has more than one field...
Read more >
<input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >
4.10 Forms — HTML5
Radio buttons also use the input element, this time with a type ... if the form has more than one field that blocks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found