From 951979b5c8e91d89aa36918f337283485c8e5825 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 10 Jan 2017 21:01:22 +0100 Subject: [PATCH] multitouch: don't process undefined touch objects (attempt to fix error when 2 touch points merge into 1) --- src/browser/js/libs/jquery.drag.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/js/libs/jquery.drag.js b/src/browser/js/libs/jquery.drag.js index 0e5a74b9..db7787cd 100644 --- a/src/browser/js/libs/jquery.drag.js +++ b/src/browser/js/libs/jquery.drag.js @@ -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