兼容微信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 isAndroid = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Adr‘) > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isiOS){
$("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的软键盘不回弹bug

上一篇:java实现windows下amr转换为mp3(可实现微信语音和qq语音转换)


下一篇:SQL Server里如何随机记录集