3

I am looking now for days for a working code to disable the iOS zoom for websites.

I also found this: disable viewport zooming iOS 10+ safari?

The fixes may work for iOS 10 but seems not to work for iOS 12. I already found a website where the zoom is disabled successfully but I am not able to find out how they have done it.

I know that Apple removed the possibility to disable the zoom via viewport-meta tag but there must be a workaround to disable it for a website.

For our website its essential that the zoom is disabled or that the zoom does not trigger a resize event. Any ideas how to solve this?

What I have tried already is e.g. to prevent touchmove / ontouchstart / gesturestart ... nothing of them worked.

TJR
  • 5,977
  • 10
  • 35
  • 64

1 Answers1

0

Double tap zoom can be disabled by adding an empty click event listener on your elements.

Disabling pinch to zoom is a pain, you have to prevent touchstart event if event.touches > 1, but this only works when page is not momentum scrolling

See my answer.

emix
  • 14,448
  • 10
  • 62
  • 82
nicopowa
  • 371
  • 2
  • 11