Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag and Drop in MobileSafari?

Is it possible to allow users to drag and drop items in mobile safari? Google images on the iPhone does something similar, but I'm not sure if it is true drag and drop or some other work around. Anyone have any insights?

like image 855
mazniak Avatar asked Oct 25 '09 02:10

mazniak


People also ask

What is the role of drag-and-drop in HTML5?

Drag and Drop (DnD) is powerful User Interface concept which makes it easy to copy, reorder and deletion of items with the help of mouse clicks. This allows the user to click and hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there.

What is drag-and-drop style?

In computer graphical user interfaces, drag and drop is a pointing device gesture in which the user selects a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object.


2 Answers

Yes, it's possible. You have to disable the default of safari moving around. A few examples and links that might help you: http://tlrobinson.net/iphone/lighttable/ http://rossboucher.com/2008/08/19/iphone-touch-events-in-javascript/

like image 61
PanMan Avatar answered Oct 23 '22 19:10

PanMan


In general, yes. Mobile Safari supports most of the standard mouse events for touches (as well as some specific touch-related events). Others, like mouseover, it doesn't support at all. You can get more specific information in the Safari Web Content Guide.

like image 38
Sixten Otto Avatar answered Oct 23 '22 17:10

Sixten Otto