watusi / jquery-mobile-iscrollview

JQuery Mobile widget plug-in for easy use of the iScroll javascript scroller.
407 stars 183 forks source link

Pull-to-Refresh causes choppy/slow scroll on some phones #101

Open CameronAskew opened 11 years ago

CameronAskew commented 11 years ago

The pull to refresh causes pages to be choppy upon scroll. Have you heard of this issue or experienced it yourself? As soon as I remove the pull to refresh html, the page scroll becomes much smoother. I was wondering if it has to do with the math behind the plugin...or maybe some issue with how I'm using it...here's an example of one of my pages..

div data-role="page" id="requestListView" div id="requestListWrapper" data-role="content" data-position-fixed="true" data-iscroll div class="iscroll-pulldown" span class="iscroll-pull-icon"/span span class="iscroll-pull-label"/span /div ul data-role="listview" data-inset="true" data-bind="foreach: Requests" li a data-bind="click: $root.SelectRequest" h3 data-bind="text: Name"/h3 div class="small" span class="grey" data-bind="text: Status"/span /div /a /li /ul /div /div

Tommykono commented 10 years ago

I've been experiencing the same issue. Iscroll is working fine with iscrollview plugin, but just adding pulldown/pulluphtml codes suddenly makes the whole thing unable to navigate properly. Transition becomes sluggish, and scroll unresponsive. Have you found any workaround?

CameronAskew commented 10 years ago

Nope, I just removed it and added a refresh button in my header bar as many apps have.

I would guess the reason it's slow is because maybe for every pixel the user scrolls down, it's re-calculating where the user is scrolled to and seeing if it needs to respond. Maybe there's a way to dig into the library and optimize it and maybe there isn't - either way, I think it would take a lot of investigation to find out, so I did none.