cordova - PhoneGap/Cordova 错误 : Miss a drag as we are waiting for WebCore's response for touch down

标签 cordova photoswipe

我正在为 IOS、Android 和 WP 制作应用程序。我正在使用 PhoneGap 2.7.0,针对 Android 进行测试。 我在模拟器 Android 2.2 中收到以下错误:

在等待 WebCore 的触地响应时错过了拖动

当我滑动照片时,我正在使用 PhotoSwipe。

没问题,应用程序正在运行。

但在模拟器 Android 3.1、4.0 或 4.0.3 中我得到了同样的错误,连同:

Stale touch event ACTION_DOWN received from webcore; ignoring

滑动不正常,我的照片有时会消失。当我滑动几下时,PhotoSwipe Gallery 完全停止工作。

我在 Google 上搜索了这个问题,发现很多人都在为这个问题苦苦挣扎。这些讨论中提供的所有解决方案都不适合我。 我已经更新了所有的库,清理了我的代码,尝试删除“e.preventDefault()”,添加了额外的代码,......但都没有效果,或者有效果但更糟糕的问题比如没有启动应用程序......

我希望有人能帮助我,我已经尝试了几天来解决这个问题!

最佳答案

我通过监听“touchstart”事件并阻止默认设置解决了这个问题。

$('.element').on('touchmove', 函数(ev) {

ev.preventDefault();

});

问题是,如果 '.element' 元素中有滚动事件,它也会取消所有滚动事件。

关于cordova - PhoneGap/Cordova 错误 : Miss a drag as we are waiting for WebCore's response for touch down,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16980520/

相关文章:

android - 使用 phonegap PushPlugin 避免多次 register() 调用

android - 不同的 Android 和 iOS 应用程序版本

javascript - Howler.JS + Angular - 播放声音文件的路径

visual-studio - 在 Ionic2 中导入 aws-amplify

javascript - 如何在重新初始化之前销毁 JQuery 插件实例? (照片刷卡)

android - 我如何在全屏中滑动选定的网格图像

安卓目标: android: command failed with exit code enoent Meteor

jquery - Photoswipe 问题 : How do i get multiple images in a gallery to scroll based on one thumbnail?

javascript - 如何避免SmartSevice中的PhotoSwipe缩放至图像原始尺寸?

html - JQuery Mobile 使用照片滑动按钮自动换行