multitouch: don't process undefined touch objects (attempt to fix error when 2 touch points merge into 1)

This commit is contained in:
jean-emmanuel 2017-01-10 21:01:22 +01:00
parent 650f5d7ed5
commit 951979b5c8

View file

@ -130,7 +130,7 @@
var oE = e.originalEvent
for (i in oE.changedTouches) {
if (isNaN(i)) continue
if (isNaN(i) || !oE.changedTouches[i]) continue
var touch = oE.changedTouches[i],
id = touch.identifier,
@ -173,7 +173,7 @@
var oE = e.originalEvent
for (i in oE.changedTouches) {
if (isNaN(i)) continue
if (isNaN(i) || !oE.changedTouches[i]) continue
var nFingers = 0
for (j in oE.touches) {
@ -229,7 +229,7 @@
for (i in oE.changedTouches) {
if (isNaN(i)) continue
if (isNaN(i) || !oE.changedTouches[i]) continue
var touch = oE.changedTouches[i],
id = touch.identifier