-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate iOS 11 Safari Drag-And-Drop Support #127
Comments
I seem to be having some conflicts with this new feature, as well. It seems it's partially working. Some of my draggable elements seem to automatically participate in the native drag-drop functionality, but others do not, and use the polyfill. It also seems that they kick in at different times. If the polyfill is active, native drag&drop kicks in some of the time time, but some elements don't seem to be draggable while others are - not sure why yet. E.g. not sure what makes some work and some not. When native drag kicks in, it can't be dropped in any drop-zones, though it does appear to recognize them as droppable zones - probably due to the fact that the drag-data is in a different format? Just guessing here... Without the polyfill, the native drag and drop recognizes most zones okay, but misses others... Will try to dig in and get more detailed info. But wanted to join the thread since this seems related. Please let me know if not! Total noob at this so not really sure what kind of info to give. iPad Air 2 |
Interesting... small update: Adding the following CSS seems to have made behavior a little more sane, and the native drag&drop does not kick in:
|
Welcome and thanks for sharing your findings 👍 You're the first source confirming that native drag and drop is at all possible in iOS11 web content! Thats good and bad news because I suppose it's drag and drop handling will introduce it's own set of quirks (like all browsers did) and hopefully we can find a way to make the polyfill not step on the toes of native drag and drop and vice versa. |
Thanks! Glad to find an active drag/drop project! I'd been using a 3 year old polyfill and tweaking it myself (gently.) Another small update. Using the -webkit-user-drag: none; attribute seems to allow the polyfill to completely take over and prevent any of the conflicts from occurring, but it would be nice to figure out what's going on and how to make them play nice together. Ah, I did make one small update to the polyfill to force disabling "passive" and "capture" modes in the document listener registration, though I'm not 100% certain this is related to blocking the native functionality: https://github.com/timruffles/mobile-drag-drop/blob/master/src/internal/dom-utils.ts#L17
|
Important note: Mobile Safari's native drag-n-drop support is only enabled on iPad, not on iPhone. As of iOS 11.2 or 11.3, they also support the standard |
@dpogue Thanks for sharing your knowledge. Is there some documentation available from Apple? |
Not that I know of... I submitted a bug report that it wasn't working on iPhone and was told it was iPad only, I asked about any documentation and was told to submit a new bug 🤷🏼♂️ |
Oh dear.. 😦 |
@lincolnthree thanks for the |
YES, exactly. The green circle with + is what tipped me off that something other than mobile-drag-drop was being invoked. |
It might be possible to have the drag and drop shim disabled on iOS 11+. If you can figure out if drag and drop is supported by changing the logic here: https://github.com/timruffles/mobile-drag-drop/blob/master/release/index.js#L21 Modernizr looked interesting: https://www.html5rocks.com/en/tutorials/dnd/basics/ |
“This technology is supported with Safari 11 in both macOS and iOS.” |
Is iOS 12 supported by the polyfill? |
@franciscolourenco I haven't seen any issues on iOS 12.2 |
Missed the news that iOS11 introduced drag and drop support and also Safari may be able to integrate the native iOS drag and drop?
https://developer.apple.com/ios/drag-and-drop/
https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/SafariJSProgTopics/DragAndDrop.html#//apple_ref/doc/uid/30001233-BAJGJJAH
This needs investigation and some poking - maybe this polyfill can feature detect support and help adoption?
The text was updated successfully, but these errors were encountered: