diff --git a/jquery.sketchable.js b/jquery.sketchable.js index b4beeb7..40146f8 100644 --- a/jquery.sketchable.js +++ b/jquery.sketchable.js @@ -408,8 +408,9 @@ */ function execTouchEvent(e, callback) { var elem = $(e.target), data = elem.data(namespace), options = data.options; - var touches = e.originalEvent.touches; if (options.multitouch) { + // Track all fingers. + var touches = e.originalEvent.changedTouches; for (var i = 0; i < touches.length; i++) { var touch = touches[i]; // Add the type of event to the touch object. @@ -417,7 +418,8 @@ callback(touch); } } else { - var touch = touches[0]; + // Track only the current finger. + var touch = e.originalEvent.touches[0]; // Add the type of event to the touch object. touch.type = e.type; callback(touch); diff --git a/sketchable.js b/sketchable.js index 317fc39..02d42b6 100644 --- a/sketchable.js +++ b/sketchable.js @@ -411,8 +411,9 @@ */ function execTouchEvent(e, callback) { var elem = e.target, data = dataBind(elem)[namespace], options = data.options; - var touches = e.touches; if (options.multitouch) { + // Track all fingers. + var touches = e.changedTouches; for (var i = 0; i < touches.length; i++) { var touch = touches[i]; // Add the type of event to the touch object. @@ -420,7 +421,8 @@ callback(touch); } } else { - var touch = touches[0]; + // Track only the current finger. + var touch = e.touches[0]; // Add the type of event to the touch object. touch.type = e.type; callback(touch);