-
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
type() does not scroll properly after a clear() #16283
Comments
If you add a However when you review the commands after they've run, the input is scrolled behind the input in the snapshot. it('...', () => {
cy.visit('index.html')
cy.get('input')
.pause()
.clear() // Comment this line to see how type() normally behaves
.type('abc')
}) So this is just a visual issue after the test is done running. |
@jennifer-shehane if I add So this is not just after the test is done running, it also happens during the test. Full code: it('...', () => {
cy.visit('cypress/integration/scroll.html')
cy.get('input')
.clear()
.type('abc', { delay: 1000 })
}) |
@JessefSpecialisterren Did you try adding the |
@jennifer-shehane I thought I did, but it turns out I only clicked Resume and didn't actually step through the commands. That's interesting! It seems that pausing and stepping through the commands stops this bug from occurring. Even with the However, when not pausing and stepping through, the |
Is the value being typed into the element correctly? I'm just wondering what the actual issue is if the value is being typed into the element at the time the Cypress test is run. |
Yes it is!
I'm writing tests for very large forms, and it's pretty frustrating to analyze failures when you can't see what Cypress is doing. It also raises questions when demoing to the customer ("Is it actually typing? I can't see it doing anything except scrolling around"). Additionally, it causes popups that are positioned relative to the |
I'm changing the title of this issue back to the original one because "Preview of type() scrolls behind element" is not the behavior I'm targeting in this issue (and is already reported in #15715) |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
Verified the behavior is still occurring on Cypress 12.12.0. A fix would still be welcome |
Current behavior
When
type()
is invoked after aclear()
, it does not scroll the input out from under aposition:fixed
elementDesired behavior
type()
should scroll the input out from under theposition:fixed
element, just like it does when it's not following aclear()
Test code to reproduce
scroll.html
scroll.spec.js
Versions
Cypress 7.2.0
Google Chrome 90.0.4430.93
Windows 10 Pro 2004
The text was updated successfully, but these errors were encountered: