【发布时间】:2019-06-06 22:01:27
【问题描述】:
我正在开发一个 Android WebView 应用程序,由于某种原因,“touchmove”事件拒绝触发。它在桌面浏览器上运行良好。我该如何解决?安卓模拟器也不行。
document.body.addEventListener("touchstart", function (e) {
console.log("touchstart", e);
e.preventDefault();
e.stopPropagation();
});
document.body.addEventListener("touchmove", function (e) {
console.log("touchmove", e); // <--- refuses to fire
e.preventDefault();
e.stopPropagation();
});
document.body.addEventListener("touchend", function (e) {
console.log("touchend", e);
e.preventDefault();
e.stopPropagation();
});
【问题讨论】:
标签: android webview touch-event