Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

viewport device-height incorrect in landscape orientation #42

Open
rtholmes opened this Issue Nov 9, 2011 · 0 comments

Comments

Projects
None yet
1 participant

rtholmes commented Nov 9, 2011

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment