Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
76
rated 0 times [  77] [ 1]  / answers: 1 / hits: 15315  / 14 Years ago, thu, may 20, 2010, 12:00:00

I have a page that uses JQuery UI; in particular the Sortable interaction.



The page works fine for desktop web browsers with mice, however I can't get the drag-drop functionality to work on Mobile Safari on the iPhone. Any dragging action simply scrolls the page.



The functionality on my page is extremely similar to the Sortable Empty-Lists demo on the JQuery UI site. This page also doesn't work on the iPhone.



Is there any way to get the drag-drop functions working on the iPhone?


More From » iphone

 Answers
39

According to the Mobile Safari docs drag and drop is not supported, but it can be simulated. Since basically dragging your finger along will scroll the browser you will have to disable this. That can be done like this:



$(document).bind('touchmove', function(e) {
e.preventDefault();
}, false);


Otherwise the event you will have to handle are touchstart, touchmove and touchend.


[#96732] Monday, May 17, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zahrafrancisr

Total Points: 176
Total Questions: 105
Total Answers: 99

Location: Svalbard and Jan Mayen
Member since Sun, Sep 25, 2022
2 Years ago
;