兼容微信6.74+ios12的软键盘不回弹bug

资料:

https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800

//兼容微信6.74 ios12版本
$("input,textarea,select").blur(function(){
    setTimeout(() => {
        const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
        window.scrollTo(0, Math.max(scrollHeight - 1, 0));
    }, 50);
})


//兼容微信6.74 ios12版本

var u = navigator.userAgent;
var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isiOS){
$("input,textarea,select").blur(function(){
setTimeout(function() {
var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
window.scrollTo(0, Math.max(scrollHeight - 1, 0));
}, 50);
})
}

 
原文地址:https://www.cnblogs.com/beimingbingpo/p/10112094.html