Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

$.mobile.defaultHomeScroll is set incorrectly when the page is short. #4571

Closed
jake-nz opened this issue Jun 21, 2012 · 4 comments
Closed

$.mobile.defaultHomeScroll is set incorrectly when the page is short. #4571

jake-nz opened this issue Jun 21, 2012 · 4 comments

Comments

@jake-nz
Copy link

jake-nz commented Jun 21, 2012

If I'm interpreting the following code (mobile.init.js:104) correctly it does this: Scroll to 1, Check if you are at 1, If so the true top is 0.

window.scrollTo( 0, 1 );
$.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;

The comments around this say scrollTop should be 1 for most browsers (non-android) so defaultHomeScroll should be 0. However, in iOS (webview, not browser) if the page is too short to scroll scrollTo( 0, 1 ) fails and defaultHomeScroll gets set to 1.

@jaspermdegroot
Copy link
Contributor

@arschmitz @toddparker

Maybe this is the cause of the issue with the non or only partly hidden address bar we noticed.

@toddparker
Copy link
Contributor

@uGoMobi - it's worth looking into, could be.

@ldeluca
Copy link
Contributor

ldeluca commented Oct 23, 2014

@JakeCR @toddparker I noticed that there hasn't been any movement on this issue in over 2 years. Is it still a problem with the latest jQM?

@arschmitz
Copy link
Contributor

@ldeluca this is no longer relevant we restore by default now no longer what it is so the logic is different. we also tracked down the cause of the issue @jaspermdegroot mentions here and it was unrelated. Closing as fixed.

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

No branches or pull requests

5 participants