Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cy.type should not insert text when non-shift modifier key is pressed #5424

Closed
kuceb opened this issue Oct 23, 2019 · 10 comments · Fixed by #4870
Closed

cy.type should not insert text when non-shift modifier key is pressed #5424

kuceb opened this issue Oct 23, 2019 · 10 comments · Fixed by #4870
Assignees

Comments

@kuceb
Copy link
Contributor

kuceb commented Oct 23, 2019

Current Behavior:
cy.get('input').type('{meta}a')
sends keypress, input, and inserts 'a' into the input

Desired Behavior:
cy.get('input').type('{meta}a')
should only send keydown/keyup and not insert the charater 'a' into the input

This could be seen as a breaking change if fixed, but I'd say it could go in as a patch

versions: -3.4.1

@jennifer-shehane
Copy link
Member

The code for this is done in #4870, but this has yet to be released. We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

@tnrich
Copy link
Contributor

tnrich commented Oct 31, 2019

@jennifer-shehane @bkucera I think that the following code is now acting differently for me in v3.5.0^

.type("{selectall}100")

image

As you can see in the screenshot, instead of tying in 100 as expected, it only types in 00

I think that {selectall} should also be made to act like the "shift" key.

Thoughts?

@kuceb
Copy link
Contributor Author

kuceb commented Oct 31, 2019

@tnrich what version of Cypress are you on? I'll need to know the exact version

@tnrich
Copy link
Contributor

tnrich commented Oct 31, 2019

@bkucera Latest v3.6.0

@tnrich
Copy link
Contributor

tnrich commented Nov 18, 2019

@bkucera bump

@kuceb
Copy link
Contributor Author

kuceb commented Nov 18, 2019

@tnrich could you screenshot the console table that gets logged when you click on the type command log? You'll need Developer Tools open to see this. And are you still having the issue on 3.6.1

@tnrich
Copy link
Contributor

tnrich commented Nov 20, 2019

Still happening with v3.6.1
image

Here's that screenshot @bkucera
image

Please let me know if you need any more info!

@tnrich
Copy link
Contributor

tnrich commented Dec 18, 2019

@bkucera bump?

@jennifer-shehane
Copy link
Member

The behavior detailed in this original issue has a test around it and has been fixed. Please open a new issue with a complete reproducible example - likely there is something special in your use case that we didn't cover. Include test code and html files to run the test against. Commenting in closed issues is not ideal.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants