上传对话框问题 - safari 5.0.5
我正在使用文件上传插件 - blue-imp。 在Safari 5.0.5(Windows XP)中测试演示页面,当您单击“添加文件”时,会出现上传对话框,但一开始无法单击。然后,如果您选择一个文件,则单击会直接穿过对话框,就好像它不可见一样。下一次单击将被对话框捕获,但如果您选择一个文件并单击“打开”,对话框将关闭并立即重新打开。然后您可以“取消”或选择另一个文件。后者因此上传了两个文件。
由于涉及本机浏览器 UI 元素,我认为 jQuery-File-Upload 会触发 Safari 5.0.5 (Windows) 中的错误。
是否有任何解决方法可以避免这种行为?
我在函数 _replaceFileInput
下的文件 jquery.fileupload.js
中注释掉了以下行,
input.after(inputClone).detach();
这解决了选择文件后出现的文件对话框的问题,但无法理解背后的逻辑,有人能给我解释一下吗?
I am using file-upload plugin - blue-imp.
Testing the demo page in Safari 5.0.5 (Windows XP), when you click "add files", the upload dialog appears but is not clickable at first. Then, if you select a file, the click goes right through the dialog as if it weren't visible. The next click is caught by the dialog, but if you select a file and click "open", the dialog closes and reopens instantly. You then may "cancel" or select another file. The latter consequently uploads two files.
As there is a native browser UI element involved, I suppose jQuery-File-Upload triggers a bug in Safari 5.0.5 (Windows).
Are there any workarounds to avoid this behaviour?
I have commented out following line in file jquery.fileupload.js
under function _replaceFileInput
input.after(inputClone).detach();
This have resolved the problem of file dialog that appears after selection of file , but unable to understand the logic behind , can anybody explain it to me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论