W3C home > Mailing lists > Public > public-webevents@w3.org > January to March 2011

Some Touch Event Behaviors to Include in the Spec

From: Andrew Grieve <agrieve@google.com>
Date: Thu, 3 Feb 2011 13:55:01 -0500
Message-ID: <AANLkTikss0uqgHoenAPoU_x25DCDpADdqsrzUShzrKc0@mail.gmail.com>
To: public-webevents@w3.org
Cc: Ryan Fioravanti <rjfioravanti@google.com>
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

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

Thanks for taking this on!

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:53 UTC