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

Fixed issue with Chrome zoom #13

Closed
wants to merge 2 commits into from

Conversation

jbcochery
Copy link

On Chrome, when the zoom is active, the following behavior is observed :

document.body.scrollTop = 5;
document.body.scrollTop; // 4.545454446934474

See https://bugs.chromium.org/p/chromium/issues/detail?id=507801

As a result the animated scroll doesn't work when the zoom is active. This PR fixes that by setting lastpos with the actual value of element.scrollTop.

Fixes #5

@richardolsson
Copy link

I've been experiencing this issue too, and came to the same conclusion independently. As I was about to submit a PR, I noticed this, which seems to fix the issue. Can you merge it, please, so we don't have to maintain a separate branch?

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

Successfully merging this pull request may close these issues.

chrome browser zoom, scroll failure.
3 participants