inactivist / django-endless-pagination

Clone of the v1.1 branch of the Google Code django-endless-pagination repo. https://code.google.com/p/django-endless-pagination/
MIT License
4 stars 2 forks source link

Endless scrolling broken on iOS devices #1

Open inactivist opened 12 years ago

inactivist commented 12 years ago

There seems to be a problem with endless scrolling on iOS devices.

in endless_on_scroll.js, the following code is executed on scroll but the scroll handler is never triggered.


        $(window).scroll(function(){
            if ($(document).height() - $(window).height() - $(window).scrollTop() <= margin) {
                $("a.endless_more").click();
            }
        });
inactivist commented 12 years ago

Setting var endless_on_scroll_margin = 250; (for example) seems to cause the scrolling to work again.

Research: Need to account for the 60px URL text field on iPhone. Reference.

inactivist commented 12 years ago

Perhaps we can watch for the 'more' link coming visible during or after scroll, rather than do the viewport math.

jQuery Appear plugin referenced in this StackOverflow question.