-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Don't start dragging unless cursor been dragged x pixels. #35
Comments
Yes, I guess it will be much more evident to users than "pressDelay" option |
I encountered a similar issue with sortable This might still lead to edge-cases when it comes to things like text-selection so maybe some way to cancel/block a drag (eg #36) might also be nice. |
Just published Alternatively, you may also use Here's the default implementation: function shouldCancelStart(e) {
// Cancel sorting if the event target is an `input`, `textarea`, `select` or `option`
if (['input', 'textarea', 'select', 'option'].indexOf(e.target.tagName.toLowerCase()) !== -1) {
return true; // Return true to cancel sorting
}
} |
aww yeah! |
Sweet, thanks @clauderic! |
…clauderic#36, clauderic#41) props. Prevent right click from causing sort start (clauderic#46)
I ran into an issue where I have items that expand when clicked. When making them sortable they no longer respond to a click, instead they become dragged immediately. I can get around this by setting the "pressDelay" but then you have to wait for the delay before it's draggable which I noticed that people tend not to do.
I'd like a way to not start the sorting unless you have actually dragged the cursor for say 5px.
The text was updated successfully, but these errors were encountered: