Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI - draggable / droppable dataTransfer is undefined

This is driving me mad.

Please forgive me but I'm not going to post the full code as it is (I believe) irrelevant. The reason behind this is obviously with my code. I was getting the following error:

draggable / droppable dataTransfer is undefined

So I decided to copy the source from:

http://jqueryui.com/droppable/#photo-manager

and I still get the same error.

I am using the latest jQuery UI with all packages included.

Does anyone know why this happens but not on the jQuery UI example?

Regards.

like image 293
Phil Jackson Avatar asked Oct 03 '11 20:10

Phil Jackson


2 Answers

To solve this problem you must add this line:

e.dataTransfer = e.originalEvent.dataTransfer;

before the error line. This should fix it.

like image 116
Alaa Badran Avatar answered Oct 19 '22 02:10

Alaa Badran


$.event.props.push('dataTransfer');
like image 20
chikamichi Avatar answered Oct 19 '22 01:10

chikamichi