12-14-2012 03:12 PM
OK - I have this
<meta name="viewport" content="initial-scale=1.0; target-densitydpi=device-dpi; width=device-width; height=device-height; user-scalable=no;" />
A Dev Alpha is 1280 x 768 - I trust the source of this info (BB guy)
Try something dumb like this...
alert(window.innerWidth + ' x ' window.innerHeight);
I'm getting the numbers - gimme a sec...
Stupid password thing
570 x 342
Solved! Go to Solution.
12-15-2012 04:02 PM
I don't have a dev alpha. But I can tell you on a BB10 phone it returns:
alert(window.innerWidth + ' x ' + window.innerHeight);
12-15-2012 04:12 PM
Are you using the meta?
I'm using similar code and getting 1/2 the numbers back
I may as well just strip out the viewport tag and see where that takes me
This is very annoying
I had to check with my BB guy about the size which was very embarrasing as I know the numbers to expect
12-16-2012 10:01 AM
Hi I had the same problem. you need to add the following:
<script> var meta = document.createElement("meta"); meta.setAttribute('name','viewport'); meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no'); document.getElementsByTagName('head').appendChi
Have a great day!