SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.78k stars 3.7k forks source link

Click events on touch devices #1617

Open sadikyalcin opened 5 years ago

sadikyalcin commented 5 years ago

Problem:

I have click events on sortable lists and they don't trigger on touch devices because as soon as you touch, sortable triggers. Any way around this?

Tested on Android - Huawei P20 Pro iOS - Seems to be fine on an iPad

owen-m1 commented 5 years ago

@sadikyalcin Try increasing the touchStartThreshold option

kkomelin commented 4 years ago

Having the same issue on Android only (iPhone is Okay). Setting touchStartThreshold=50 didn't help. My version is 1.12.0

kkomelin commented 4 years ago

Fixed my issue by using the following setting:

filter: ".ignore-elements", // Selectors that do not lead to dragging (String or Function)
andresespinosapc commented 2 years ago

I have the same problem but only when adding a filter. On the element I put the filter, the click event doesn't work.

andresespinosapc commented 2 years ago

It was fixed for me setting the preventOnFilter option to false.