<script>
    document.body.addEventListener("focusout", () => {
        //软键盘收起的事件处理
        setTimeout(() => {
            const scrollHeight =
                document.documentElement.scrollTop || document.body.scrollTop || 0;
            window.scrollTo(0, Math.max(scrollHeight - 1, 0));
        }, 100);
    });
</script>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-09-08
  • 2021-08-04
猜你喜欢
  • 2021-12-30
  • 2021-12-21
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-10-20
  • 2021-09-10
相关资源
相似解决方案