Solved

IOS7 Web App keyboard orientation bug

Posted on 2014-01-08
4
509 Views
Last Modified: 2014-02-09
IOS7 web apps specifically (webpages saved to home screen) have a bug when the keyboard is open, the device thinks that the screen height has changed to the viewable area minus the keyboard (288px high instead of 548px), which then applies css media queries meant for only landscape mode even though the device is still in portrait mode.

Some references:
http://stackoverflow.com/questions/19297821/keyboard-orientation-and-media-query-bug-app-mode
http://hype.desk.com/customer/portal/questions/3174313-screen-orientation-bug-in-ios-7-bug-for-home-screen-web-app
http://www.danielcwilson.com/blog/archives/18

We are looking for a solution to this, and none has yet been posted online.

Thanks
0
Comment
Question by:collages
4 Comments
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
Have you got a sample link? How are you detecting the orientation. Purely css?
0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
Comment Utility
Timmah's suggestion on Stack Overflow might be the best workaround for now. However, you may want to add something to it to avoid styling smart-watches unintentionally.

Please try the following media queries and let us know whether each works. (I don't have iOS 7 at this time or I'd test them myself.)
@media only screen and (min-device-aspect-ratio:1/1) and 
   (max-device-aspect-ratio:3/2) and (min-device-height:480px) {

}

Open in new window

@media only screen and (min-device-aspect-ratio:1/1) and 
   (max-device-aspect-ratio:3/2) and (height:288px) {

}

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now