Me

That's me!

Visitors:

1337

Quick Links

Follow Me

Disables zoom action on mobile

📅 September 9, 2025
#web-development #mobile-responsive #react
💬 15 comments 👀 324 views ⏱️ 3 min read

Disabling zoom or pinch-to-zoom feature on mobile devices, especially for iframes.

The task is about disabling zoom or pinch-to-zoom feature on mobile; especially for iframe. Googling for solutions always throws me with this HTML meta tag:


This may seems convincing at first, and it works; except for web developers worst enemy; Safari.

[Safari 10+ no longer respects user-scalable=no](https://stackoverflow.com/a/47866795) which brings another frustation. But the research never stops. This brings me to another solutions; via Javascript event listener.


The following code checks for touches. If it is more than 1 touches, disable default behavior(which most likely be pinch to zoom). Does it disable scrolling? No. Since scrolling only use 1 finger so it works normally. Solved! atleast for now....

👋 Thanks for reading!

Did you enjoy this post? Let me know what you think! I love hearing from readers.

← Back to Blog

Written with ❤️ by Quddus

Last updated: 2/6/2026

💌 Want more awesome content?

Subscribe to get notified when I publish new posts!

* No spam ever, just quality content delivered straight to your inbox!

🌟 Enjoying the retro vibe? This website is best experienced with a dial-up connection! 📞

© 2024 Quddus Portfolio. Best viewed in Netscape Navigator.