//处理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);
                        }
                   })
             }
    },

 

相关文章:

  • 2022-02-24
  • 2021-11-06
  • 2021-12-29
  • 2022-12-23
  • 2021-04-10
  • 2021-07-14
  • 2021-04-16
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2021-05-11
  • 2021-12-08
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案