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

Google Canary Version 61 - body.scrollTop() is returning 0 #49

Closed
wants to merge 2 commits into from
Closed

Google Canary Version 61 - body.scrollTop() is returning 0 #49

wants to merge 2 commits into from

Conversation

m-kuzev
Copy link

@m-kuzev m-kuzev commented Jun 26, 2017

View-port detection is wrong on current canary and the scroll isn't working only with ('body')

@slavidim
Copy link

slavidim commented Sep 7, 2017

you need to create -> viewportStart_obj = document.scrollingElement ? document.scrollingElement : document.body;
Find this code -> viewportStart = $(scrollElem).scrollTop();
Replace for this -> viewportStart = viewportStart_obj.scrollTop;

@dirkgroenen
Copy link
Owner

This one should be fixed by merging the following PR: #55

@seltix5
Copy link

seltix5 commented Feb 2, 2021

hello,
I dont understand why use the document.body to get the scrollTop(), I'm I wrong to think the document.body element represents the entire page and thus the scrollTop should be always 0? Why not use window instead? window should represent the browser viewport... right?
$(window).scrollTop(); works as expected.

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.

4 participants