jquery-ui-touch-punch
jquery-ui-touch-punch copied to clipboard
Fixed click on drag and zoom issues
- Resolved and issue where a drag event would result in a click event after dropping. Decision based on the the length of the tap/drag event and the distance moved.
- Dragging while zoomed in caused issues where the draggable showed at an incorrect position on the screen making it unusable. I applied the fix from Kocik's fork. Note that this only works if the container in which the draggable resides has a position: relative. Here is the fork: https://github.com/Kocik/jquery-ui-touch-punch-zoom-fork, thanks Kocik!
Recently I had a problem when I tried to click in a draggable.
Your fix actually worked, now I am able to click a button or someelement in a draggable div.
The lines:
touch.clientX + $(window).scrollLeft(), // clientX + scrollLeft - fix for zoomed devices while dragging touch.clientY + $(window).scrollTop(), // clientY + scrollTop - fix for zoomed devices while dragging
Seem to prevent jQuery.ui sortable from allowing you to drop the item you move on Android and iphone machines...