Allow to disable scrolling by mouse dragging #439

codename- opened this Issue Jul 24, 2013 · 9 comments


None yet

5 participants


I think it would be more elegant to iScroll if it allow developer to decide of scrolling by mouse drag. My proposal is to add mouse flag in option and this simple if statement:

    if (this.options.mouse) {
      eventType(this.wrapper, 'mousedown', this);
      eventType(target, 'mousemove', this);
      eventType(target, 'mousecancel', this);
      eventType(target, 'mouseup', this);
cubiq commented Jul 24, 2013

good idea. thanks


No problem


Hey - has this been implemented? I need to disable mouse drag on a project i'm working on right now.


Where do you add this?


I add this if in _initEvents function and add default mouse: true, into options object declaration.


Oh I'm guessing you're talking about iScroll 5 and not 4?


Yup! I talking all the time about iScroll 5


Was wondering how can I do it for iScroll4.

@cubiq cubiq added a commit that closed this issue Oct 29, 2013
@cubiq fix #439 #488 #517 #428 #270 #520 #447 #452 #509 052c5ba
@cubiq cubiq closed this in 052c5ba Oct 29, 2013

Summary for those wondering how to disable mouse-click-drag scroll and still have mouse-wheel-scroll use this:

mouseWheel: true,
disableMouse: true

p.s. This is also a good fix for the problem of not being able to highlight the text inside IScroll without stressfull injections through preventDefaultExceptions like here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment