9. 弹出键盘挡住input

1.) react 中

  <input className="inp3" placeholder="密码" type="password" onChange={this.changepassword.bind(this)} onFocus={this.FocusFN.bind(this)} value={this.state.paswword}/>

  FocusFN(){

    setTimeout(()=>{

      let pannel = document.querySelector('.inp3');

      pannel.scrollIntoView(true);
    },200)
  }

 

posted @ 2018-05-24 14:59  大耳朵小虎  阅读(97)  评论(0编辑  收藏  举报