// Android 4.0系でtouchendが発火しない対策
// # touchstart時もしくはtouchmove時にe.preventDefault()で
// # ブラウザのスクロールを停止しないとtouchendが発火しない
$("*")
.on("touchstart", function(e) {
Y1 = e.originalEvent.touches[0].clientY;
})
.on("touchmove", function(e) {
Y2 = e.originalEvent.touches[0].clientY;
if(Math.abs(Y1 - Y2) < 5){
e.preventDefault();
}
});
More than 5 years have passed since last update.
Android 4.0系のWebViewでtouchendが発火しないバグ対策
Last updated at Posted at 2013-10-12
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme