events; drag: listen for touchcancel too

This commit is contained in:
jean-emmanuel 2018-01-15 13:58:14 +01:00
parent e5cfbbc91c
commit 6283726360
2 changed files with 2 additions and 2 deletions

View file

@ -46,4 +46,4 @@ document.addEventListener('touchstart', (event)=>{
})
DOM.addEventListener(document, 'touchend touchmove', clearLongTouchTimer)
DOM.addEventListener(document, 'touchend touchmove touchcancel', clearLongTouchTimer)

View file

@ -168,7 +168,7 @@ document.addEventListener('touchmove', (event)=>{
}
}, true)
document.addEventListener('touchend', (event)=>{
DOM.addEventListener(document, 'touchend touchcancel', (event)=>{
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]