Allow to disable scrolling by mouse dragging #439

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

Projects

None yet

5 participants

@codename-

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
Owner
cubiq commented Jul 24, 2013

good idea. thanks

@codename-

No problem

@dgsunesen

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

@rodoabad

Where do you add this?

@codename-

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

@rodoabad

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

@codename-

Yup! I talking all the time about iScroll 5

@rodoabad

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
@vkovalskiy

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 http://jsfiddle.net/UDF59/

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