h5开发安卓软键盘遮挡解决方案
Posted 高丰鸣
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了h5开发安卓软键盘遮挡解决方案相关的知识,希望对你有一定的参考价值。
//处理input focus时被键盘遮挡问题 inputFocus:function(){ if(/android [4-6]/.test(navigator.appVersion)) { window.addEventListener("resize", function() { if(document.activeElement.tagName=="INPUT" || document.activeElement.tagName=="TEXTAREA") { window.setTimeout(function() { document.activeElement.scrollIntoViewIfNeeded(); },0); } }) } },
以上是关于h5开发安卓软键盘遮挡解决方案的主要内容,如果未能解决你的问题,请参考以下文章
部分安卓手机上出现切换界面时软键盘无法收回的情况,请问该如何解决?