madcowpp / dcDragAndDrop

MIT License
0 stars 1 forks source link

Browser compatibility #1

Open Weestdudochnicht opened 7 years ago

Weestdudochnicht commented 7 years ago

Your Plugin doesnt work for Firefox. Please fix it.

madcowpp commented 7 years ago

That is not true, the directives work in Firefox, it's the demo which does not work. This is due to the use of 'event.srcElement' in the handler functions (which Firefox does not support, see here). You are welcome to provide a demo which works in Firefox as well, which can be done by replacing 'e.srcElement' by 'e.target' in demo.js. The demo also does not work properly in Chrome, because Chrome does not allow access to dataTransfer.getData properties in dragOver events.

Weestdudochnicht commented 7 years ago

sorry. i missed to use the setData, what is necessary for firefox...

event.originalEvent.dataTransfer.setDragImage(element, 10, 10); event.originalEvent.dataTransfer.setData('text', null);

madcowpp commented 7 years ago

Since the demo indeed does not work with firefox, I'm changing the issue. I'm not gonna fix that, because I'm not working with Angular anymore. If anyone is interested I wrote how to fix it already in my first comment.