0

I have a custom theme (rwd set as parent theme), in mobile view I want to disable gesture zoom through out the site. For this I have below code in head.phml

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

I also tried adding below code

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

But none of the above seems working, anyone has idea how to disable gesture zoom?

1

Have you tried testing on different devices? Some device such as iPhones on iOS10+ completely ignore this as it results in terrible user experience.

See https://stackoverflow.com/questions/37808180/disable-viewport-zooming-ios-10-safari for more info

  • I have tried it with two different android devices with chrome browser – Piyush Nov 7 '17 at 10:04
  • Also I checked some other sites in the same device and those were not having this problem, So it is not device issue I think. – Piyush Nov 7 '17 at 10:07
  • Strange, has the meta tag updated in the code? – Ben Crook Nov 7 '17 at 10:14
  • yes it is updated and visible in the source code – Piyush Nov 7 '17 at 10:14
  • Try adding minimum-scale=1.0 and setting user-scalable to 1. If that doesn't work then I've no idea sorry :( – Ben Crook Nov 7 '17 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.