iOS下输入框调起键盘收起页面未下移问题?

页面不下移问题

重新触发下scrollIntoView

解决方案

/iphone|ipod|ipad/i.test(navigator.ua) &&
    document.addEventListener(
        'blur',
        (e) => {
        ['input'].includes(e.target.localName) &&
            document.body.scrollIntoView(false);
        },
        true
    );

 

版权声明:
作者:wuhou123
链接:https://wuhou.fun/480.html
来源:前端网
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
海报
iOS下输入框调起键盘收起页面未下移问题?
页面不下移问题 重新触发下scrollIntoView 解决方案 /iphone|ipod|ipad/i.test(navigator.ua) && document.addEventListener( 'blur', ……
<<上一篇
下一篇>>
文章目录
关闭
目 录