HubSpot / sortable

Drop-in script to make tables sortable
http://github.hubspot.com/sortable/docs/welcome
MIT License
1.33k stars 116 forks source link

Sort handler triggered twice on mobile #32

Closed benoitdevrieze closed 9 years ago

benoitdevrieze commented 9 years ago

When tapping on the header of a sortable column on a mobile device (Android, Chrome, latest) the sort handler is triggered twice resulting in the same sorting direction. On slow devices it is visible that the sorting happens twice. This makes that the user is not able to switch the sorting direction. The issue is most probably caused by differences in touch input api's of different browsers.

zackbloom commented 9 years ago

I can imagine this happening if the touchstart and click events are considered seperate, causing this code not work: https://github.com/HubSpot/sortable/blob/master/coffee/sortable.coffee#L41-L44