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

前端 未结 3 1150
执念已碎
执念已碎 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: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. :)

提交回复
热议问题