Drag & Drop on Safari iOS: Won't drag, won't respond to drop on desktop/iPad

前端 未结 3 1149
执念已碎
执念已碎 2020-12-29 09:18

I am coding a webpage to be viewed on iPad. It uses Safaris/Webkits drag & drop. I have exactly copied Safari\'s example drag & drop code but it won\'t work.

相关标签:
3条回答
  • 2020-12-29 09:47

    I had a similar issue with one of my project but it can be resolved by following tutorial: http://popdevelop.com/2010/08/touching-the-web/ . It works for me I hope you will like it.

    0 讨论(0)
  • 2020-12-29 09:51

    Did you read the top of the page you linked to in Apple's documentation? It says:

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

    DOM Touch link

    Safari DOM Additions link

    I believe you may want to listen for the touchmove and touchend events instead of on drag and on drop. :)

    0 讨论(0)
  • 2020-12-29 09:52

    Working alternative :

    Firstly, use jquery UI http://jqueryui.com/demos/ for drag and drop functionality

    and then add this script https://github.com/furf/jquery-ui-touch-punch for playing it in Ipad or Iphone.

    Hope it helps.

    0 讨论(0)
提交回复
热议问题