Browser does not change screen data on device orientation change

asked 2015-01-02 22:48:29 +0200

JoshStrobl gravatar image

During some testing on orientation changing, I noticed that screen.height and screen.width do not change when the device orientation changes between portrait and landscape.

Example: Say the screen dimensions (<height, width>) were <400,200> in portrait mode. When you change the device orientation to landscape, the screen.height and screen.width should flip, so it reports as <200,400>, since in landscape you actually would have 200px vertical height and 400px width, not the 400px vertical height and 200px width.

Testing in Firefox both on the desktop and the Android app both correctly report screen.height and screen.width. I haven't tested in Webcat (uses QtWebkit).

edit retag flag offensive close delete