scottjehl / Device-Bugs

Just a collection of quirks and issues that occur on browser platforms (particularly those unlikely to update)
864 stars 19 forks source link

Android Default Browser Keyboard Fires Resize Event #39

Open nicdaCosta opened 11 years ago

nicdaCosta commented 11 years ago

On Android 4.0.x - 4.2.x in the default browser ( non nexus devices), the keyboard is not an overlay such as IOS and latter versions of Android, but instead uses existing screen real estate.

When opening the keyboard, the browser's resize event is fired, and the window.innerHeight() returns a smaller value than the default screen height. This can also effect CSS orientation media queries, as the device will think that the orientation has changed ( due to the window's height < width )

Related reading with a potential work around for CSS media queries.