Disable auto zoom/field zoom on input tags on my Mobile Site - WITHOUT disabling all zoom capabilities

John Rakowski picture John Rakowski · Feb 25, 2011 · Viewed 63.3k times · Source

I have spent all day looking for a solution, and this site keeps coming up, SO why not ask you guys.

I an building our companies mobile website and we want to disable the auto zoom mobile devices use to zoom into text/search/email inputs when they are focused on. I am building the site in HTML5 and have seen/tested the <meta name="viewport" content="width=device-width, user-scalable=no" /> solution. With various properties (ie. minimum-scale=#, maximum-scale=#" ) This, works in almost ALL mobile devices I am testing on. Only one problem. I want the user to be able to zoom in/out at their leisure. (we have some higher res product shots that would be nice to see up close)

How can I disable zooming in when clicking on input tags, while retaining full manual user zoom control?

p.s the site also uses jQuery. So any thoughts using that might help.

thank you Jrak

Answer

Scott picture Scott · May 30, 2012

Setting the meta tag in the <head> like this worked for me:

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">