sortable
sortable copied to clipboard
Require pointer to have moved before drag starts
Issue
Our application has a sortable item that could also be clicked (think cards on a Trello board).
When using Macbook trackpads with "tap to click" disabled, we could never click to open the item. It would always attempt to sort it instead.
Solution
Require the mouse to be moved a certain distance before the drag behaviour starts.
This was done by adding a "distance" option.
I figure this small distance should be imperceptible for most current users of the library, while fixing this strange behaviour on trackpads.
Note
I looked at https://github.com/livewire/sortable/pull/21. If it were accepted, I could have added the option in my app without changing the options for everyone. There was no other way I could have change the options in the underlying package otherwise.