1

I'm using user-scalable=no in my viewport meta tag to disable double tap zooming in iOS. Almost everything seems to work as I wanted except a few very small and specific spots still allow me to zoom by double tapping in the iPhone simulator. Why is this so? Is there some css or other meta tags that could negate the viewport meta tag settings in such small specific areas? Any ideas?

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, minimum-scale=1.0">
...
  • Possible duplicate of [How to disable zooming capabilities in responsive design?](http://stackoverflow.com/questions/13215730/how-to-disable-zooming-capabilities-in-responsive-design) – hdotluna Feb 10 '17 at 02:03
  • Thank you for your concern. Like I indicated in the question, I have already implemented the viewport meta tag. And while this mostly works, I still find some areas where the iphone simulator allows me to zoom by double tapping. I hoping this is a simulator issue somehow, but that doesn't seem likely. – eddie Stanley Feb 10 '17 at 19:39

1 Answers1

0

ios safari doesn't really support this meta tag any more. you need to add event listener to "gesturestart" event and "preventDefault". gesturestart event

jilykate
  • 5,430
  • 2
  • 17
  • 26