Skip to content

Commit

Permalink
Add a SHOULD clause about pan gestures and what happens if a gesture …
Browse files Browse the repository at this point in the history
…suddenly changes direction

Closes #303
  • Loading branch information
patrickhlauke committed Feb 16, 2021
1 parent d770a96 commit a14c326
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ <h2>Determining supported touch behavior</h2>
<li>A touch behavior <dfn data-lt="conforming-touch-behavior">conforms to an element's <code>touch-action</code></dfn> if the behavior is allowed in the coordinate space of the element. Note that if CSS transforms have been applied, the element's coordinate space may differ from the screen coordinate in a way to affect the conformity here; for example, the X axis of an element rotated by 90 degrees with respect to the screen will be parallel to the Y-axis of the screen coordinate.</li>
<li>A touch behavior is supported if it <a data-lt="conforming-touch-behavior">conforms</a> to the <code>touch-action</code> property of each element between the hit tested element and its nearest ancestor with the default touch behavior (including both the hit tested element and the element with the default touch behavior).</li>
<li>Once a touch action has been started, and the user agent has already determined whether or not the action should be handled as a user agent touch behavior, any changes to the relevant <code>touch-action</code> value will be ignored for the duration of the touch action. For instance, programmatically changing the <code>touch-action</code> value for an element from <code>auto</code> to <code>none</code> as part of a <code>pointerdown</code> handler script will not result in the user agent aborting or suppressing any default touch behavior for that touch for as long as that pointer is active.</li>
<li>Similarly, in the case of the various <code>touch-action</code> values of <code>pan-*</code>, once the user agent has determined whether to handle an action directly or not at the start of the action, a subsequent change in the direction of the same gesture/action SHOULD be ignored by the user agent for as long as that pointer is active. For instance, if an element has been set to <code>touch-action: pan-y</code> (meaning that only vertical scrolling is handled by the user agent), and a gesture starts of horizontally, no vertical scrolling should occur if the user changes the direction of their action to be vertical at some point during the same gesture.</li>
</ul>

<div class="note">Some user agents support touch actions triggered by interactions of multiple concurrent pointers (e.g. multi-touch). Methods for processing or associating the <code>touch-action</code> values of multiple concurrent pointers is out of scope for this specification.</div>
Expand Down

0 comments on commit a14c326

Please sign in to comment.