jQuery UI-可拖动/可拖放的dataTransfer未定义 [英] jQuery UI - draggable / droppable dataTransfer is undefined

查看:266
本文介绍了jQuery UI-可拖动/可拖放的dataTransfer未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这让我发疯了.

请原谅我,但我不会发布完整的代码,因为它(无关紧要).这背后的原因显然是我的代码.我收到以下错误:

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.

我正在使用包含所有软件包的最新jQuery UI.

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

有人知道为什么会这样,但是在jQuery UI示例中没有吗?

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

致谢.

推荐答案

要解决此问题,您必须添加以下行:

To solve this problem you must add this line:

e.dataTransfer = e.originalEvent.dataTransfer;

在错误行之前. 这应该可以解决.

before the error line. This should fix it.

这篇关于jQuery UI-可拖动/可拖放的dataTransfer未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆