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

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

@jake-nz

Description

@jake-nz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions