Bug 20217 - Expand touch-action property to include more of the values implemented by IE?
Expand touch-action property to include more of the values implemented by IE?
Status: RESOLVED FIXED
Product: PointerEventsWG
Classification: Unclassified
Component: Pointer Events specification
unspecified
PC Windows 3.1
: P1 normal
: ---
Assigned To: Jacob Rossi [MSFT]
This bug has no owner yet - up for the taking
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-03 22:09 UTC by Rick Byers
Modified: 2013-02-04 05:45 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Byers 2012-12-03 22:09:18 UTC
The IE implementation of pointer events specifies several different values for touch-action: http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx.  The pointer-events draft specification currently includes only 'auto', 'none' and 'inherit'.

One important scenario where I believe additional control is essential is when there is a scrollable list which can also be pulled side to side to trigger some action.  Eg., imagine a google+ page where pulling horizontally switches the stream you're viewing, but pulling vertically scrolls it.  I believe the only way to implement this with pointer events is to use touch-action: none and process scrolling entirely in JavaScript.  This is unaccaptable because it then becomes very difficult to mimic the browser's native scrolling feel.  

With touch events (as implemented in iOS and chrome desktop at least) it's possible to implement this by listening for all events on the div, but ignoring the touchmove events corresponding to scrolling.  Once a sufficient horizontal movement is detected, then preventDefault can be called to stop scrolling and javascript used to implement the horizontal action.

I believe the IE implementation of pointer events can handle this scenario even better.  By using 'touch-action: pan-y', the element can be scrolled vertically without any involvement of javascript (and so in a completely hardware accelerated fashion).  However if the user moves horizontally instead, events can be generated which the application can respond to.
Comment 1 Rick Byers 2012-12-04 01:22:20 UTC
Since many of the specific things a UA may do with a touch-action is outside the scope of the pointer events WG, perhaps the right thing to do here is just to tweak the wording to make it clear that UAs are expected to include their own list of specific actions (because otherwise pointer events can't be used to implement important scenarios).  Maybe we could even include some potential example actions as a note?
Comment 2 Jacob Rossi [MSFT] 2013-02-04 05:45:26 UTC
Added pan-x and pan-y values for touch-action per 1/22 telecon resolution.
https://dvcs.w3.org/hg/pointerevents/rev/43a55140b685

RESOLUTION: http://www.w3.org/2013/01/22-pointerevents-minutes.html