iOS6, UIWebView and position:fixed

混江龙づ霸主 提交于 2019-12-24 04:57:10

问题


We have a PhoneGap application that has navigation bar and tab bar "implemented" as divs with fixed position (see screen 1).

In iOS6 there's some strange behavior with these divs when the keyboard is shown. When we type a first letter the div will disappear and the blank area is displayed instead. When we're closing a keyboard everything goes back to normal.

This happens in UIWebView only and doesn't happen in Mobile Safari.

Did anyone had something similar? I suppose we shouldn't be alone.

Screen shots:


回答1:


The problem is jQuery mobile setting the page height from script at the same time as the OS pushes the view up to keep the input visible.

Some css to ignore the jqm height change fixed the issue for me.

.ui-mobile, .ui-mobile .ui-page {
    min-height: 100% !important;
}



回答2:


Finally, we had to tweak that and hide the footer on entering the edit field and storing it on blurring event. Not too good, but helps.



来源:https://stackoverflow.com/questions/12529796/ios6-uiwebview-and-positionfixed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!