diff --git a/lib/jli.js b/lib/jli.js index 293c18d..1aa3d10 100755 --- a/lib/jli.js +++ b/lib/jli.js @@ -488,7 +488,8 @@ function makeKeyboardHandler(keybindings, unhandled){ -// XXX handle multiple fingers... +// XXX handle multiple touches... +// - timeout on lift to count fingers... // XXX setup basic styles for the contained element... // XXX revise... // XXX test on other devices... @@ -516,6 +517,11 @@ function makeScrollHandler(root, config){ var dt function startMoveHandler(evt, callback){ + // if we are already touching then just skip on this... + if(touches > 0){ + return false + } + touches = touch ? event.touches.length : 1 prev_t = event.timeStamp || Date.now(); if(scroller.options.autoCancelEvents){ bounds = { @@ -553,7 +559,7 @@ function makeScrollHandler(root, config){ // get the user coords... x = touch ? event.touches[0].pageX : evt.clientX y = touch ? event.touches[0].pageY : evt.clientY - touches = touch ? event.touches.length : 0 + touches = touch ? event.touches.length : 1 // XXX needs testing... // check scroll bounds...