* 输入框被第三方输入法遮挡问题

$("input").bind('focus',function(){

var ua = navigator.userAgent.toLowerCase();
if(/android/.test(ua)){
var height = (window.screen.height-50)/2;
var inputHeight = $(this).offset().top;
//$(".btn-right").css('margin-bottom','30px');
try{
myScroll.refresh();
}
catch(err){

}
if(inputHeight > height){
height = height-50;
// var thisPage = window.location.href.indexof("ocr.html")!=-1;
// if(!myScroll){
// $(".content-article").css('margin-bottom',height + 'px');
// $(".content").scrollTop(height);
// }else{
$(".iscroll>div").last().css('margin-bottom',height + 'px');
setTimeout(function(){
try{
myScroll.refresh();
myScroll.scrollTo(0,height,300,true);
}
catch(err){

}

},300);
// }
}
}

});

原文地址:https://www.cnblogs.com/yongwang/p/7543682.html