Touch-action what is it for? CSS

1

I'm getting a warning in the Google Chrome console:

  

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See link   e @ 332526c6e8d3fc1326ad773f97b0a486.js: 5029   dispatch @ 332526c6e8d3fc1326ad773f97b0a486.js: 583   r.handle @ 332526c6e8d3fc1326ad773f97b0a486.js: 583

By using touch-action: none; and body of my site , this warning no longer appears.

  • Would you like to know why the warning? and
  • What does touch-action: none; do to remove it?
  • asked by anonymous 05.12.2017 / 13:16

    1 answer

    2

    The touch-action property lets you decide what the touch behavior of that item will be on sensitive devices, for example:

    /* Keyword values */
    touch-action: auto;
    touch-action: none;
    touch-action: pan-x;
    touch-action: pan-left;
    touch-action: pan-right;
    touch-action: pan-y;
    touch-action: pan-up;
    touch-action: pan-down;
    touch-action: pinch-zoom;
    touch-action: manipulation;
    
    /* Global values */
    touch-action: inherit;
    touch-action: initial;
    touch-action: unset;
    

    These are the possible values that touch-action can have.

    As a partial answer to your question touch-action:none disables all "pinch" and zoom gestures that the user performs.

    Source on touch-action : link

        
    05.12.2017 / 13:34