Drag and drop with dataTransfer between windows possible for touch devices?

436 Views Asked by At

I'm a bit surprised - and maybe I'm just searching for the wrong terms - but to me it currently looks like you can't have drag and drop with data transfer on touch devices, is that true?

At least all I find is libraries like interact.js or draggable making drag & drop inside a browser easier and consistent among different browsers and devices but they don't support data transfer. For data transfer you use the Drag and Drop API which seems to not support touch devices.

This article seems to suggest this, too. Though it's old enough to keep up the hope that things have changed..

Am I missing something?

And in case I want drag and drop for item movement and data transfer for mouse and touch devices - would I have to implement for both interdependently?

1

There are 1 best solutions below

3
On

I found this repository on github:

https://github.com/Bernardo-Castilho/dragdroptouch

Seems nice if it works as advertised. I tested it on Android 12 with the stock browser and it worked. Then I tested it on iOS 12, which is only 4 years old, in Safari and it didn't work.

This is going to be difficult. Support will still be patchy. I also don't quite understand what you mean by "datatransfer between windows". You mean drag and drop between browser windows?