0

I've tried all three of these but no luck:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; 
user-scalable=0;" />

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; 
user-scalable=false;" />

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; 
user-scalable=no;" />

Each are different values I found recommended by google searching or SO searching, but none of the 'user-scalable=X' values seem to be working

I also tried comma delimiting the values instead of semicolon, no luck. Then I tried ONLY having the user-scalable value present, still no luck.

Apple Says this

To improve accessibility on websites in Safari, users can now pinch-to-zoom even when a website sets user-scalable=no in the viewport.

Also tried:

<meta name="HandheldFriendly" content="true">
html {
   -webkit-text-size-adjust: none
}

Tried Javascript as well

document.documentElement.addEventListener('touchmove', function (event) {
      event.preventDefault();      
}, false);

Javascript solution worked but it disables horizontal scroll as well. :(

none of above is working. Any ideas?

Gags
  • 3,359
  • 8
  • 37
  • 84
  • Possible duplicate of [disable viewport zooming iOS 10 safari?](http://stackoverflow.com/questions/37808180/disable-viewport-zooming-ios-10-safari) – robocat Jan 23 '17 at 00:01

1 Answers1

3

This should work until Apple comes to their senses and stops removing features we all use...

document.documentElement.addEventListener('gesturestart', function (event) {
    event.preventDefault();      
}, false);
lifwanian
  • 564
  • 1
  • 5
  • 18
  • 1
    This results inconsistent pinchzoom... sometime possible and sometime not coming back when zoomed :| ... Apple has really overwritten things in a BAD way – Gags Sep 28 '16 at 08:32