What does the CSS touch-action property do?

The CSS touch-action property tells the browser which touch gestures it may handle on an element. The browser uses that information before JavaScript listeners run, so a custom drag surface can claim one gesture while leaving page scrolling or pinch zoom available. Use the least restrictive value that supports the component.
The default auto allows normal browser panning and zooming. pan-y keeps vertical page scrolling available while JavaScript can handle a horizontal gesture. manipulation allows panning and pinch zoom while excluding some extra gestures. none disables browser panning and zooming on the affected region and needs careful accessibility review.
.carousel-track {
touch-action: pan-y pinch-zoom;
}
.drawing-canvas {
touch-action: none;
}
When a gesture starts, the browser combines touch-action values on the target and its ancestors up to the scrolling element. Changing the property during that gesture does not alter the current decision. Apply it to the component’s interaction surface instead of every descendant, and avoid conflicting rules on parent containers.
Pointer-event code may receive pointercancel when the browser takes over a gesture. A suitable touch-action value makes that handoff predictable. Calling preventDefault() in touch listeners is an older and less declarative approach, and passive listener behavior can prevent it from working as expected.
Test ordinary scrolling from inside the component, diagonal movement, pinch zoom and assistive zoom. A map may need custom panning, while a horizontal carousel should still let the page move vertically. Never disable zoom across the whole document merely to simplify a widget because users with low vision may depend on it.