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?
+1
A:
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.
Sixten Otto
2009-10-26 05:57:01
Check out Google Images on an iPhone or iTouch to see what I am talking about. They definitely allow you to "drag" images by dragging them to the left or right.
mazniak
2009-10-26 18:06:11
They might be implementing it themselves with the usual mousedown/move/up events. Or they might be relying on the "panning" gesture described right at the beginning of the page I linked to (which generates scroll events). Either is definitely possible.
Sixten Otto
2009-10-26 18:25:06
+6
A:
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/iphone/ http://rossboucher.com/2008/08/19/iphone-touch-events-in-javascript/
PanMan
2009-11-04 09:13:20