jQuery UI - draggable / droppable dataTransfer is undefined

自作多情 提交于 2019-11-29 06:09:40

问题


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.


回答1:


To solve this problem you must add this line:

e.dataTransfer = e.originalEvent.dataTransfer;

before the error line. This should fix it.




回答2:


$.event.props.push('dataTransfer');


来源:https://stackoverflow.com/questions/7640234/jquery-ui-draggable-droppable-datatransfer-is-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!