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

Scrolling elements into view broken when using scroll-behavior: smooth #28150

Closed
aKzenT opened this issue Oct 26, 2023 · 5 comments · Fixed by #28217
Closed

Scrolling elements into view broken when using scroll-behavior: smooth #28150

aKzenT opened this issue Oct 26, 2023 · 5 comments · Fixed by #28217

Comments

@aKzenT
Copy link

aKzenT commented Oct 26, 2023

Current behavior

Starting with version 13.3, the scrolling of elements into view, triggered e.g. by "click" no longer works when using scroll-behavior: smooth. This causes actionability checks to fail.

We are setting scroll-behavior: smooth directly on the "html" tag.

I noticed that there were some changes done in that area in the 13.3 version which are probably causing the issue.
https://github.com/cypress-io/cypress/pull/27860/files#diff-10c3dbee8439d9d33f63478cc0b81d1e87bf6e50530c3669f159bdf5c97bb7a6

Desired behavior

Scrolling should work as it has worked until version 13.2

Test code to reproduce

no repo, sorry

Cypress Version

13.3

Node version

20.2

Operating System

Windows 11

Debug Logs

No response

Other

No response

@sizzle168
Copy link

Same issue here!

@jennifer-shehane
Copy link
Member

@aKzenT @sizzle168 Please provide a reproducible example of the behavior, including what the HTML is, how scroll-behavior is being added, etc. We have tests around this behavior, so likely it's an edge case. We won't be able to begin fixing it until we get an idea of this edge case to fix.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Oct 30, 2023
@aKzenT
Copy link
Author

aKzenT commented Oct 31, 2023

@jennifer-shehane I added a repro here: https://github.com/aKzenT/cypress-scroll-bug/ . It seems the problem occurs, when the body element uses "overflow-y: auto;"

@jennifer-shehane
Copy link
Member

@aKzenT Thanks! We'll take a look.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 8, 2023

Released in 13.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.5.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants