fisshy/angular-drag-drop

Cross compatability Issue -- Firefox

Closed this issue · 5 comments

I'm having troubles getting this to work in firefox. Going to the live example (http://www.devfishy.com/dnd), it, too, has the same problem on firefox. The css classes added on work, however nothing drags nor does any drop work. Any words of advice?

Using the newest version of firefox?

Seems like the fiddle example is working - but the live one doesn't work.

Haven't looked close yet.

What you could do is to see if every event gets triggered as it should ( dragstart, dragend etc)

With much fiddling, I figured it out. On firefox, you need to set the data of the event object for it to move. All I had to do was add 'e.originalEvent.dataTransfer.setData( 'text', angular.toJson( scope.item ) );' in the dragevent binding and it did the trick.

Cool! Didn't know it had to be set.
Set it to an empty string( or write smth in it if you have too ) and you dont have to convert unecessary data :P.
And then you can make a pull request if possible.
/J

Date: Wed, 18 Sep 2013 06:44:54 -0700
From: notifications@github.com
To: Angular-drag-drop@noreply.github.com
CC: Jockkee_@hotmail.com
Subject: Re: [Angular-drag-drop] Cross compatability Issue -- Firefox (#4)

With much fiddling, I figured it out. On firefox, you need to set the data of the event object for it to move. All I had to do was add 'e.originalEvent.dataTransfer.setData( 'text', angular.toJson( scope.item ) );' in the dragevent binding and it did the trick.


Reply to this email directly or view it on GitHub.

Sure!