robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
216 stars 27 forks source link

event.dataTransfer #21

Closed quilkin closed 1 year ago

quilkin commented 1 year ago

I am trying to convert a project that uses HTML drag and drop (dragStart etc). It works well on desktop but fails on mobiles. When I use vue-3-touch-events, the events triggered don't have the 'dataTransfer' property, so I cannot use my existing code for event handling. Is there a workaround? Thanks. Chris

robinrodricks commented 1 year ago

What is the 'dataTransfer' property? Never heard of it before. And why do you need it? Pls elaborate more.

quilkin commented 1 year ago

This is what I mean: https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer - so I didn't know how to carry a parcel of info along with the item being dragged, Since I didn't get a timely reply, I've been trying other ways and am now in the middle of writing my own DnD code for Vue/Vuetify. If I can't make it work, maybe I'll come back to trying 'vue-3-touch-events' - I've learned a lot in the interim so maybe I could now solve my original problem :)

quilkin commented 1 year ago

Sorted by creating a global object to hold transfer props