-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Typing a modifier key anywhere removes selected text from an input in 3.5.0 #5439
Comments
I can confirm that this behavior has changed from 3.4.1 to 3.5.0. Test exhibiting change. describe('test', () => {
it('test', () => {
cy.document().then((doc) => {
doc.body.innerHTML = `
<textarea class="one">hello</textarea>
<textarea class="two">hello</textarea>
<input class="three" value="hello">
`
})
// (1) clears whole textarea
cy.get('.one').type('{selectall}').type('{ctrl}')
// (2) clears whole textarea
cy.get('.two').type('{selectall}')
cy.get('body').type('{ctrl}')
// (3) removes last letter
cy.get('.three')
.focus()
.then(($input) => {
$input[0].selectionStart = 4
$input[0].selectionEnd = 5
})
.type('{ctrl}')
.should('have.value', 'hello')
})
}) 3.4.13.5.0This does appear to me to be a bug - since doing this behavior manually does not clear the selected value when pressing |
The code for this is done in cypress-io/cypress#5496, but has yet to be released. |
1 similar comment
The code for this is done in cypress-io/cypress#5496, but has yet to be released. |
Released in 3.6.0 |
Current behavior:
Typing a modifier key
into an inputanywhere removes selected text in an active input.Desired behavior:
Shouldn't touch input value at all.
Steps to reproduce: (app code and test code)
Versions
3.5.0
, Win 7, chrome stable 77 (headed) & chrome canary 73 (headless)3.3.1
→3.5.0
directly)The text was updated successfully, but these errors were encountered: