diff --git a/index.html b/index.html index 67efd50..7600166 100644 --- a/index.html +++ b/index.html @@ -667,6 +667,16 @@
touch-action
CSS propertyThe touch-action
CSS property determines whether touch input MAY trigger default behavior supplied by user agent. This includes, but is not limited to, behaviors such as panning or zooming.
When a user touches an element, the effect of that touch is determined by the value of the touch-action
property and the default touch behaviors on the element and its ancestors. A touch behavior is supported if allowed by the touch-action
properties of all elements between the hit tested element and it's nearest ancestor with the default touch behavior (including both the hit tested element and the element with the default touch behavior).
touch-action
values of multiple concurrent pointers is out of scope for this specification.During the execution of a user agent touch behavior, the user agent MUST NOT fire subsequent pointer events for the pointer. The user agent MUST fire a pointer event named pointercancel
(and subsequently a pointerout
event and one or more pointerleave
events) whenever all of the following are true, in order to end the stream of events for the pointer:
pointerdown
event has been sent for the pointer, andpointerup
or pointercancel
event (following the above mentioned pointerdown
) has not yet been sent for the pointer.Values have the following meanings:
touch-action
CSS propertytouch-action
property only applies to elements that support both the CSS width
and height
properties (see [[CSS21]]). This restriction is designed to facilitate user agent optimizations for low-latency touch actions. For elements not supported by default, such as <span>
which is a non-replaced inline element (see [[HTML5]]), authors can set the display
CSS property to a value, such as block
, that supports width
and height
. Future specifications could extend this API to all elements.pan-x pan-down
whenever the scroll position is 0 and pan-x pan-y
otherwise. This allows pointer event handlers to define the behavior for upward scrolls that start from the top of the document. The direction-specific pan values can also be used for composing a component that implements custom panning with pointer event handling within an element that scrolls natively (or vice-versa). For example, an image carousel may use pan-y
to ensure it receives pointer events for any horizontal pan operations without interfering with vertical scrolling of the document. When the carousel reaches its right-most extent, it may change its touch-action to pan-y pan-right
so that a subsequent pan operation beyond it's extent can scroll the document within the viewport if possible. It's not possible to change the behavior of a pan in the middle of an operation.
auto
user agents typically add 300ms of delay before click
to allow for double-tap gestures to be handled. In these cases, explicitly setting touch-action: none
or touch-action: manipulation
will remove this delay. Note that the methods for determining a tap or double-tap gesture are out of scope for this specification.When a user touches an element, the effect of that touch is determined by the value of the touch-action
property and the default touch behaviors on the element and its ancestors. To determine the effect of a touch, find the nearest ancestor (starting from the element itself) that has a default touch behavior. Then examine the touch-action
property of each element between the hit tested element and the element with the default touch behavior (including both the hit tested element and the element with the default touch behavior). If the touch-action
property of any of those elements disallows the default touch behavior, do nothing. Otherwise allow the element to start considering the touch for the purposes of executing a default touch behavior.
touch-action
values of multiple concurrent pointers is out of scope for this specification.During the execution of a user agent touch behavior, the user agent MUST NOT fire subsequent pointer events for the pointer. The user agent MUST fire a pointer event named pointercancel
(and subsequently a pointerout
event and one or more pointerleave
events) whenever all of the following are true, in order to end the stream of events for the pointer:
pointerdown
event has been sent for the pointer, andpointerup
or pointercancel
event (following the above mentioned pointerdown
) has not yet been sent for the pointer.<div style="touch-action: none;"> This element receives pointer events for all touches.