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

RE: Is touch-action implicitly applied to any elements?

From: Jacob Rossi <Jacob.Rossi@microsoft.com>
Date: Wed, 19 Dec 2012 18:01:03 +0000
To: Daniel Freedman <dfreedm@google.com>, Rick Byers <rbyers@google.com>
CC: "public-pointer-events@w3.org" <public-pointer-events@w3.org>
Message-ID: <852a7073e81b4e59b733df5b3bc86476@BY2PR03MB028.namprd03.prod.outlook.com>
I believe there's some language missing from the spec to clear things up. Here's perhaps a more concise description of the behavior (emphasis on the last sentence):

When a user touches an element, that element's -ms-touch-action property determines the default touch behaviors permitted for that contact, like panning or zooming. The touch behavior is then performed on the nearest ancestor element that is capable of that behavior, unless an intermediate ancestor element specifies that the behavior is not permitted.

Does that clear things up?

From: Daniel Freedman [mailto:dfreedm@google.com]
Sent: Monday, December 17, 2012 3:13 PM
To: Rick Byers
Cc: public-pointer-events@w3.org
Subject: Re: Is touch-action implicitly applied to any elements?

In the second version of your example, switching to -ms-touch-action: auto on the outer div leaves no -ms-touch-action: none area in the page.
IE10 has a default action on document ( or window?) to use x-axis panning for back/forward history gesture.
The finger can move around a little bit in the x-axis when dragging, and it appears the history gesture has no hysteresis.
If you quickly tap the area instead, you will see a MSPointerMove event.

On Mon, Dec 17, 2012 at 3:01 PM, Rick Byers <rbyers@google.com<mailto:rbyers@google.com>> wrote:
Oh, I totally missed that the spec says touch-action isn't inherited - duh.  Sorry.

Ok then I'm seeing different behavior that is surprising.  If touch-action isn't inherited, then why does changing outer between 'none' and 'auto' affect the behavior of inner when it's not overflow scroll?  Is IE using the touch-action of the parent somehow in deciding how to implement "auto"?

Sample code updated: http://jsfiddle.net/rbyers/YTSuu/.

On Mon, Dec 17, 2012 at 5:45 PM, Rick Byers <rbyers@google.com<mailto:rbyers@google.com>> wrote:
In the absence of additional CSS rules that also specify touch-action, the following two should be equivalent, right?

<div id="outer" style="touch-action: none">
  <div id="inner"> </div>
</div>

and

<div id="outer" style="touch-action: none">
  <div id="inner" style="tocuh-action: inherit"> </div>
</div>

In the current IE implementation this seems not to be the case.  In particular, if the inner div is overflow: scroll, then it seems to take on the behavior of '-ms-touch-action: auto'.  Explicitly specifying inherit gets the behavior I expect.  Sample code here: http://jsfiddle.net/rbyers/YTSuu/.

I can see why this might be a good thing (probably makes it really easy to convert certain mouse based games to support touch without breaking inner scrollable elements), but I also find it surprising.  If this is really the intended behavior, then the spec should probably say something about it, right?

Thanks,
   Rick
Received on Wednesday, 19 December 2012 18:02:43 UTC

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