Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
73
rated 0 times [  79] [ 6]  / answers: 1 / hits: 25416  / 11 Years ago, fri, september 27, 2013, 12:00:00

I have bound events to different elements, and when I drag them in all browsers, except Firefox, it works as expected. In firefox, however, it doesn't work at all. The only event that fires is dragstart, and none of the other events fire. What's going on?


More From » firefox

 Answers
33

I'm not using jQuery, so removed the originalEvent portion and changed the format to text (or IE had issues), and it works:


event.dataTransfer.setData('text', 'anything');  

In the drop event make sure to call:


event.preventDefault();

Or it will jump to anything.com.


[#75381] Thursday, September 26, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neo

Total Points: 117
Total Questions: 100
Total Answers: 95

Location: Albania
Member since Fri, Jan 28, 2022
2 Years ago
;