blackberry / WebWorks-TabletOS

BlackBerry WebWorks for Tablet OS is a platform for building deeply integrated web applications for the BlackBerry PlayBook
http://us.blackberry.com/developers/tablet/webworks.jsp
Apache License 2.0
70 stars 14 forks source link

viewport device-height incorrect in landscape orientation #42

Open rtholmes opened 13 years ago

rtholmes commented 13 years ago

I have a webworks app that has only a single line different between the build for the TabletOS and for the smartphone platforms.

TabletOS:

<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width, target-densitydpi=device-dpi" /&rt;

SmartPhone:

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

The only difference between the two is that the TabletOS doesn't have the 'height=device-height' argument.

This argument is required on the smartphone (at least for my app) as without it only the top 6px of the screen are used. The argument works fine on the tablet, as long as you open your app in portrait mode. If you open it in landscape mode though the device-height value doesn't update to the landscape height and instead sets the viewport height to the portrait height (or landscape width).