jQuery UI - draggable / droppable dataTransfer is undefined

Phil Jackson picture Phil Jackson · Oct 3, 2011 · Viewed 12k times · Source

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.

Answer

Alaa Badran picture Alaa Badran · Nov 27, 2011

To solve this problem you must add this line:

e.dataTransfer = e.originalEvent.dataTransfer;

before the error line. This should fix it.