January 18, 2011

Android: touchmove event bug

touchmove events in Android web browsers have a really serious bug. If you don't include the following code, the touchmove event will fire once, but not again until you're done moving your touch, which utterly kills the usefulness of the touchmove event. It's a weird one, and may very well break more advanced touch logic that works on iOS. But if you preventDefault() on the touchstart event, your touchmove will function as expected.
element.addEventListener( "touchstart", function(e){ onStart(e); }, false );
function onStart ( touchEvent ) {
  if( navigator.userAgent.match(/Android/i) ) {
This bug is documented here:

and is probably not entirely unrelated to my previous post about weird Android Touch event behavior:


  1. thanks a lot, used this code now, it works well.

  2. If it's useful for someone...
    Samsung galaxy Tab GT-P3100 with Android 4.0.4
    has a lot of problems in Phonegap...

    -Slide transitions blanking...
    -Touch events delays (worst than ever) with the message:
    V/webview(24354): singleCursorHandlerTouchEvent
    getEditableSupport FASLE
    There is no way to prevent the delays, nor with event.preventdefault , NOTHING TO DO....

    The same application, exactly the same, the same device, but wiith Android 4.0.3, WORKS PERFECTLY!!!

    So, avoid upgrading Android version!
    Waiting to Jelly Bean to make the application working (HOPE FOR IT)
    or else.....