zoukankan      html  css  js  c++  java
  • ios10键盘问题

    updated(){
            var _this= this;
         //键盘弹起遮挡输入框  document.body.addEventListener('focusin', (e) =>{ var timer1 = setInterval(function() { document.body.scrollTop = document.body.scrollHeight; _this.scrollToBottom() clearInterval(timer1); }, 100) }) // 软键盘消失后,解决页面无法回弹 document.body.addEventListener('focusout', (e) =>{ var ua = navigator.userAgent.toLowerCase(); if(/iphone|ipad|ipod/.test(ua)) { var currentPosition, timer2; var speed = 1; timer2 = setInterval(function() { currentPosition=document.documentElement.scrollTop || document.body.scrollTop; currentPosition-=speed; window.scrollTo(0,currentPosition); currentPosition+=speed; window.scrollTo(0,currentPosition); clearInterval(timer2); }, 1); } }) },

      

  • 相关阅读:
    20145220&20145209&20145309信息安全系统设计基础实验报告
    20145209 《信息安全系统设计基础》第8周学习总结
    R574
    gym102219
    102222F
    luogu 1337
    luogu 2503 & bzoj 2428
    18 BJ J
    poj 1981
    101992 I
  • 原文地址:https://www.cnblogs.com/yewook/p/14703799.html
Copyright © 2011-2022 走看看