Skip to content

Commit 7c8b00d

Browse files
committed
Only one scroll action at a time, please.
1 parent fc1115e commit 7c8b00d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scrollable/scrollable.autoscroll.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
* Function to run autoscroll through event binding rather than setInterval
4444
* Fixes this bug: http://flowplayer.org/tools/forum/25/72029
4545
*/
46-
function scroll(){
46+
function scroll(){
47+
if (timer) {
48+
clearTimeout(timer);
49+
}
4750
timer = setTimeout(function(){
4851
api.next();
4952
}, opts.interval);

0 commit comments

Comments
 (0)