Touch Action
The touch-action
property sets how an element's region can be manipulated by a touchscreen user.
CSS Properties
touch-action
Sets which gestures should be handled by the browser.
(Allows you to define the remaining gestures' behavior using pointermove
and pointerup
listeners.)
Specify:
auto
— enables browser handling of all panning and zooming eventsnone
— disables browser handling of all panning and zooming eventsmanipulation
— enables panning and pinch zoom gestures, but disable additional non-standard gestures such as double-tap to zoom (removes the need for browsers to delay the generation of click events when the user taps the screen)- One of
pan-x
,pan-left
,pan-right
, and/or one ofpan-y
,pan-up
,pan-down
, AND optionallypinch-zoom
. — enables single-finger scrolling in the given direction (forpan-*
), OR enables multi-finger zooming of the page (forpinch-zoom
)
References
- touch-action (MDN) — https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action