add cancelOn selector to disable dragging when mousedown on matched elements #5

tborychowski opened this Issue Sep 27, 2010 · 3 comments


None yet

2 participants


Currently I'm doing something like this (it works but it certainly can be improved :-)):

I've added to options:

   cancelOn: ''

than at the beginning of "start" method:

   if ($( return true;

to disable dragging all matched elements (children of the main element)

but this didn't work.until I commented out this line:

   .bind(, o.noop); // disable proprietary drag handlers

With all this it works perfectly!
But I'm sure you can do it better :-)


I've improved the start method piece:

   var $t=$(,
   if ($ || $t.parents(cancelOn).length) return true;

with this you can define cancelOn in overscroll declaration like:

   cancelOn: '.aBox'

and overscroll will not drag the parent scroller when mouse clicked .aBox or any element inside it.


Hmm, this is interesting... I'll push it up on the priority scale since you already put in the work for it ;)


This is now implemented in 1.4.2 (will release soon!)

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