W3C home > Mailing lists > Public > public-webevents@w3.org > October to December 2012

What happens to touchend/touchcancel when touchstart target no longer present?

From: Nathan Vander Wilt <nate-lists@calftrail.com>
Date: Sat, 3 Nov 2012 15:39:56 -0700
Message-Id: <D04A2D11-51F8-4091-982C-81AEB691D48C@calftrail.com>
To: public-webevents@w3.org
I'm worried about the implications of the touchend/touchcancel event definitions in a situation where touch events drive DOM modifications. Mouse up events are fired at the element the mouse is *currently over*, while the Touch Events specification(s) say the following:

"The target of this event must be the same Element on which the touch point started when it was first placed on the surface, even if thetouch point has since moved outside the interactive area of the target element."
http://www.w3.org/TR/touch-events/#the-touchend-event / https://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html#the-touchend-event

What is to happen if the element on which the touchstart event was originally fired is no longer in the DOM? This case is actually quite common in web map applications, where the finger typically starts on the DOM element of a map tile or marker that which very well get removed throughout a continuous gesture.

I would have expected that (as with mouse events) simply registering touchmove/touchend/touchcancel events on the window would be sufficient, but unless there is some underlying specification that would have the touch events re-targetted when necessary this seems like a serious issue in the specification.

Losing events for a finger at the window level just because its touch was unlucky enough to land on a replaced child element is a big problem. Could the specification be changed to clarify that this is not the intention?

Received on Saturday, 3 November 2012 22:41:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:09:34 UTC