Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

viewport device-height incorrect in landscape orientation #42

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

viewport device-height incorrect in landscape orientation #42

rtholmes opened this issue Nov 9, 2011 · 0 comments

Comments

@rtholmes
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant