08-27-2013 08:28 PM - edited 08-27-2013 08:28 PM
I'm building my first html5 app and I have the following on my meta tag.
<meta id="viewport" name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, width=device-width" />
However, I found that I'm still able to zoon and pan around the page. I thought 'user-scalable=no' was supposed to prevent that. Any thoughts on why that's the case? Is my meta tag incorrect?
My meta tag is within the <head></head> tags.
Solved! Go to Solution.
08-28-2013 01:07 PM
This works for me:
<meta name="viewport" content="initial-scale=1, user-scalable=no" />
Are you using any frameworks? They may be overriding this meta tag. If you use Web Inspector, expand the head tag in the Elements tab and make sure the meta tag is still there.
Also test with a basic HTML file, to make sure it isn't the framework you are using that's causing this.
09-01-2013 12:08 AM
Still having trouble with this, it's frustrating me to no end!
I noticed that when using the ripple viewer everything looks fine. But once I load it onto the simulator or on my Z10, zoom is enabled.
i thought it ws my code so I decided to check the tutorial example. (https://developer.blackberry.com/html5/documentati
Is this a bug in webworks or the BB Browser in 10.1?
09-01-2013 12:26 AM
var meta = document.createElement("meta");
meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no');
Now on to try this on my actual app and hope it works..
BTW I got that info from the following article.