The Most Secure Cross Browser Testing Platform since 2012

Blog

Cross-Browser touch-action property

shutterstock_234378844
BLOG / Web Development

Cross-Browser touch-action property

The touch-action is a css property that controls filtering of gesture events, providing developers with a declarative mechanism to selectively disable touch scrolling (in one or both axes), pinch-zooming or double-tap-zooming.

Browser Support

This feature is already supported by a few major browsers including Chrome, Internet Explorer 11, Microsoft Edge and Opera.

Code Example

You can use touch-action property like this:

<div style="touch-action: pan-x;">
    This element receives pointer events when not panning in the horizontal direction.
</div>

More Information

More information can be found here.