4

There are a lot of questions how to disable pinch to zoom and there are a lot of good answers. What I learned from questions like this and what I'm using in my app is:

<meta name="viewport" 
      content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">


html, body {
  -ms-content-zooming: none;
  touch-action: none;   
}

This works well for IE11 and on Chrome for most cases. But there is at least one special case, where Chrome on a MS Surface with Windows 8.1 starts to zoom: Pinch on a div that has overflow: auto. Is this a known issue? Is there any solution to this problem (I can't find)?

A Javascript solution is not a problem, since I already handle touch events to implement different touch gestures (like a custom zoom action). I could call event.preventDefault() in my touch event handlers but this disables the default scroll gestures as well.

Community
  • 1
  • 1
hansmaad
  • 18,417
  • 9
  • 53
  • 94

0 Answers0