移动Safari中的本机HTML5拖放(iPad,iPod,iPhone)? [英] Native HTML5 Drag and Drop in Mobile Safari (iPad, iPod, iPhone)?

查看:130
本文介绍了移动Safari中的本机HTML5拖放(iPad,iPod,iPhone)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功实施了本机HTML5拖放,以便移动页面内的HTML元素(就是说,从一个地方到另一个地方的div,没有任何相关与主机OS文件进行交互)。这在Chrome和Safari上都可以正常工作,但是我无法在iPad的Safari中启动拖动操作。

I've successfully implemented native HTML5 Drag and Drop for moving HTML elements inside a page (just, say, a div from one place to another, nothing related to interacting with the host OS' files whatsoever). This works fine in Chrome and Safari on a PC but I can't start a drag operation in my iPad's Safari.

我已经找到了这个:


使用JavaScript中的拖放

Using Drag and Drop From JavaScript

Safari,仪表板和基于WebKit的
应用程序包括支持
自定义拖动的行为和
放置操作在您的HTML
页。

Safari, Dashboard, and WebKit-based applications include support for customizing the behavior of drag and drop operations within your HTML pages.

注意:这项技术支持
仅在桌面版本的Safari。
对于iPhone操作系统,使用处理事件(部分
Safari Web内容指南)和Safari
DOM添加参考中描述的DOM Touch,

Note: This technology is supported only on desktop versions of Safari. For iPhone OS, use DOM Touch, described in Handling Events (part of Safari Web Content Guide) and Safari DOM Additions Reference.

此处。但是它已经过时了(2009-06-08)。

Here. But it's outdated (2009-06-08).

Doe的任何人都知道是否可以在Mobile Safari中使用 native HTML5? (我不想像JavaScript框架像jQuery UI这样的解决方案)。

Doe's anyone know if it is possible to use native HTML5 in Mobile Safari? (I don't want javascript-framework like solutions like jQuery UI).

谢谢!

推荐答案

它可能是旧的,但它仍然是最新的。 以下是有关使用 touchstart touchmove

It may be old but it's still current. Here's a good article on getting drag and drop working with ontouchstart and ontouchmove.

这篇关于移动Safari中的本机HTML5拖放(iPad,iPod,iPhone)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆