iOS 11 Safari drag-n-drop is not standard

Originator:darryl
Number:rdar://32596156 Date Originated:2017-06-06
Status:Closed Resolved:
Product:iOS Product Version:11
Classification:WebKit Reproducible:Always
 
Summary:
Drag & Drop support in Safari on iOS 11 is implemented using a CSS "-webkit-user-drag: element" style.  The HTML standard specified a `draggable` attribute to be used for this purpose.

Steps to Reproduce:
Create an HTML element with the `draggable` attribute: <div draggable="true">Hello World</div>

Expected Results:
The div element should be draggable.

Observed Results:
The div element is not draggable in Safari on iOS 11.

Version:
Safari on iOS 11 beta simulator (15A5278f)

Notes:
A workaround is probably to add global CSS to the project that does something like this:

[draggable="true"] { -webkit-user-drag: element; }

Comments

Apple Developer Relations

Because the original issue is resolved, we are closing this report. For any documentation issues, please file a new bug report.

darryl

Ah, it does work on iPad.

It's definitely not clear from the documentation at https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/SafariJSProgTopics/DragAndDrop.html that it's an iPad-only feature. It says "supported with Safari 11 in both macOS and iOS" with no distinction for different devices.

Apple Developer Relations

Appears to be working for me. See: http://whsieh.github.io/examples/draggable-emojis for an example of the draggable attribute in action (I just tested this on iOS 11.3, on an iPad Pro).

One thing I noticed that I didn’t before, is that you attempted this “on Safari on iOS 11.3 (iPhone 6S)”. We don’t support drag and drop in Safari at all on iPhone, and that is expected behavior.

Please verify this on iPad.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!