Open MathieuDerelle opened 6 years ago
This is a bug. Firefox requires the transfer-data
prop to be set, even if it's empty. Here's a fixed fiddle: https://jsfiddle.net/yp0hsv7n/3/
Leaving this open to keep track of the underlying bug.
I'm still having an issue in firefox. Works fine in chrome. The transfer-data prop is set. Not sure what else to try...
The demo page and the fiddle above works in my firefox...strange.
@diablo341 Are you sure you're using the most current version of vue-drag-drop? There was a Firefox bug introduced by 1.0.0 that has since been fixed.
Hello, Firefox seems to be annoying with drag'n'drop, at least it doesn't work like the other browsers.
I had the same issue, but when applying :transfer-data="{'text/plain' : 'anything'}"
to my <drag>
component it got solved.
Then I had another issue when I want to get the coordinates (dx, dy) of the shift of the dragged element from its original position: Firefox doesn't expose the coordinates the same way as the other browsers. After digging into the Internet, it's recommended to do a listener on the document itself to be able to get this information. I created a mixin for that:
https://gist.github.com/SebastienTainon/2c0a38ac1e12b8ca9c863e437127ebdc
Good point is that it seems to work in all browsers. Bad point is that it currently uses jQuery but I'm sure it can be done without easily.
The coordinates bug mentioned by SebastienTainon alse happen on IE11
I don't know why but this simple example https://jsfiddle.net/kc5ao03n/ does not work in firefox (61.0 (64 bits))
But the example https://jsfiddle.net/fuz987r5/3/ from the issue #50 does.
Any idea of what's going on ?