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

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> 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 Monday, 17 December 2012 23:02:07 UTC