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

Cypress scrolls elements beyond what they're capable of #706

Open
brian-mann opened this issue Oct 3, 2017 · 1 comment

Comments

4 participants
@brian-mann
Copy link
Member

commented Oct 3, 2017

Internally Cypress uses element.scrollIntoView() to deterministically ensure we scroll elements the same way before interacting with them.

This has an unfortunate side effect. The browser will sometimes scroll the offset parents beyond what they're capable of.

Here's a demonstration.

http://jsfiddle.net/LEqjm/258/

We could switch to using element.scrollIntoView(false) else we're going to have to write our own algorithm. The above example is way too simple. Elements could be nested in scrollable containers within other scrollable containers within the window which is scrolled.

The browser normally ensures every parent is scrolled appropriately, but we'd have to implement this logic ourselves.

/cc @paulfalgout (this is the issue you've been describing)

@paulfalgout

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2017

False would be an improvement at least

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.