Some Touch Event Behaviors to Include in the Spec

Just wanted to suggest some cases to include in the spec. I realize the spec
is a work-in-progress, but wanted to make sure these cases are thought
about.

What should happen when a touch is dragged off the screen
 -on iPhone no touchend or touchcancel is fired, which is annoying

If the user taps the screen, and the page changes the DOM within the context
of the touchstart event, should a click event be fired on the new DOM?
 -this is the case for both Android & iPhone
 -Mobile Google Docs takes advantage of this by placing a textarea under
your click
 -It would also be nice to prevent the click, say with a preventDefault() on
the touchend.

If preventDefault() is called on all touchmove events, should a click be
fired even after dragging and taking your finger off the screen?
 -This is the case with iOS
 -I can't think of why this would be desirable.

What events (if any) fire if an alert() is performed within a touch event?
 -It would be nice to guarantee all touchstart event had corresponding
touchend events.
 -I haven't tried this out myself.

How do touch events propagate when they begin on an iframe?
 -iOS and Android they are always routed to the child iframe.

Targets for touch events, Elements or Nodes?
 -iOS and Android the target will be a #textnode if one was under the tap
 -mouse events seem to use the parent element of the #textnode as the
target.

Thanks for taking this on!

Andrew

Received on Thursday, 3 February 2011 21:10:11 UTC