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

Need smooth scrolling to properly trigger animations #1111

Open
dalin- opened this issue Nov 7, 2019 · 3 comments
Open

Need smooth scrolling to properly trigger animations #1111

dalin- opened this issue Nov 7, 2019 · 3 comments

Comments

@dalin-
Copy link

dalin- commented Nov 7, 2019

I'm testing a page that is a long list of article teasers. There is CSS animation so that as you scroll down the page the articles fade in one by one. In BackstopJS I have a scenario that scrolls to the bottom of the page to trigger the animations. This doesn't actually work as expected because the browsers scrolls instantaneously, so only the first few are triggered.

However, if we alter the engine scripts to use smooth scrolling, everything works as expected.

InstantaneousScroll

SmoothScroll

@dalin-
Copy link
Author

dalin- commented Nov 7, 2019

Here's the pull request:

#1112

@garris
Copy link
Owner

garris commented Nov 8, 2019

Could this change break or impact performance of existing tests?

@dalin-
Copy link
Author

dalin- commented Nov 8, 2019

Linting issues fixed. Tests now pass.

I was thinking that this change might also help lazy-loaded images: just scroll to the bottom of the page rather than adding custom JS to force your lazy-load library to load all images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants