phonegap ios固定虚拟键盘上的input字段

用jQuery Mobile创build一个phonegap应用程序。 在我的应用程序中,一个固定的input字段出现在虚拟键盘的顶部,这是在Android中正常工作,但在IOS时,虚拟键盘出现无法正常工作。

我的问题是这个IOS更小虚拟键盘上的固定页脚工具栏打破

JS

header_height = $('.main-header').height(); footer_height = $('.footer').height(); footer_input_height = $('.fixed_bottom').height(); $('.fixed_bottom').css('bottom',footer_height+'px'); $('#messages .ui-panel-wrapper').css('padding-bottom','inherit'); $("input, textarea").blur(function() { $("[data-role=footer]").show('','',function(){ $('#messages').css('padding-bottom',footer_height+'px'); $('#messages .ui-panel-wrapper').css('padding-bottom','inherit'); $('.fixed_bottom').css('bottom',footer_height+'px'); }); }); $("input, textarea").focus(function() { $("[data-role=footer]").hide('','',function(){ $('#messages').css('padding-bottom','0px'); $('#messages .ui-panel-wrapper').css('padding-bottom','0px'); $('.fixed_bottom').css('bottom','0px'); }); }) 

CSS

 #messages .fixed { left: 0; right: 0; width: 100%; position: fixed; z-index: 1000; display: block; } #messages .fixed_bottom { bottom: 0px; } 

在android中截图 安卓

在iPhone中进行屏幕浏览 苹果手机