touchend is not triggered
I have implemented touchevents which evoke the same function like my mouse events:
onclick -> the touchstart { do something }
mousemover -> touchmove { do something }
mouseup -> touchend { do something }
All works but touchend is not triggered.
document.body.addEventListener('touchstart', start);
function start(e){ do something ; touchDefaults(e); }
document.body.addEventListener('touchmove', move );
function move(e){ do something ; touchDefaults(e); }
document.body.addEventListener('touchend', end );
function end(e){ do something ; touchDefaults(e); }
document.body.addEventListener('touchcancel', cancel );
function cancel(e){ touchDefaults(e); }
document.body.addEventListener('touchleave', leave );
function leave(e){ touchDefaults(e); }
链接地址: http://www.djcxy.com/p/95588.html
上一篇: 触摸鼠标悬停的事件
下一篇: touchend没有被触发