Double scrolling issue in 1.2.6 for Scrollable #591

alibby251 opened this Issue Dec 11, 2011 · 4 comments


None yet

5 participants


There is an issue with the autoscroll plugin for the scrollable object. If you use the nav while it is autoscrolling, it causes a strange double scroll when the next autoscroll fires. It is like it creates a new timeout without removing the first one.

Steps to repeat:

  1. Go to
  2. Click Play
  3. Let the autoscroll fire once
  4. After 2 seconds, click the left arrow nav button to go back one slide
  5. Watch what happens when the autoscroll fires in the future

In fact, if you click the nav multiple times, it seems to create additional timeouts for each click. You can really get this thing to freak out!

(copied from

evrard commented Dec 20, 2011

I have done a modification on the scrollable.autoscroll.js source (see that seems to solve the issue :

Before line 47, tell the scroll() function to clear the timeout if there is one, if this case, where the scrollable API will seek on any item, the autoscroll API will reset its timeout.

      function scroll(){
        // Fixes
        if (timer) clearTimeout(timer); // reset timeout, especially for onSeek event
        timer = setTimeout(function(){ // assign a new one
        }, opts.interval);

Let me know if it sounds correct for you.



@evrard I've had the same issue and this does the trick. Thanks for the fix!


Should be merged in the master branch!

@evrard have you submitted a pull request?

evrard commented Jan 16, 2012

@poxd There is no pull request for this bugfix, sorry.

@duclet duclet closed this Jan 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment