iScroll 4 first fix for acceleration on multiple touchmoves

Chicago Temple Building 50 by orijinal, on Flickr

Chicago Temple Building 50 by orijinal, on Flickr

iScroll 4 is a great library for adding scrolling to mobile Html5 applications. Unfortunately I found that there is something missing in how the scroller works compared to native scrolling. After comparing how one of my HTML5 mobile applications scrolls compared to an equivalent native app I found one major difference that changes the feel of the iScroll scroller – multiple consecutive scrolls on the native app speeds up the scrolling. With iScroll 4 multiple scrolls resets the speed of the inertia/momentum which could be faster or slower depending on how fast you moved your finger. This creates a negative difference in the feel of the scrolling and also causes usability issues for very large scrollable areas – for example lists containing several hundred items, since you can’t quickly scroll to the end of the list.

One of the Phonegap applications that I am working on has an interface which could potentialy contain a very long list. I have tried a couple of other HTML5 scrolling libraries and haven’t found one that has a better implementation then iScroll 4. A very simple solution for iScroll 4 would be to simply add the scroller’s current speed to the speed that the user has added with each touchmove. This would result in multiple fast scrolls within a short period of time getting the scroller moving very fast, while not changing the way that iScroll works for regular touchmoves. While I haven’t created a full solution for this issue yet I have created a fork of iScroll on Github with a first draft of a speed retaining scroller. There is an issue with my current version which causes some user interactions to stop the scrollers inertia entirely… Since I am using my revised edition in my ongoing development hopefully this issue will be resolved within a few days.

Speed retaining iScroll fork on Github.

2 Responses to “iScroll 4 first fix for acceleration on multiple touchmoves”

Read below or add a comment...

  1. Lala Waghmode says:


    Do you have any idea to scroll div using buttonclick in iScroll4.

    If know please reply.

    • Joshua says:

      I think what you are after can be accomplished using an onclick event.

      From the iScroll 4 page:

      You can scroll programmatically with scrollTo, scrollToElement and scrollToPage (if your are using the snap feature).

Leave A Comment...