解决IOS微信浏览器键盘关闭后底部留白问题
document.body.addEventListener('focusout', () => {
let ua = window.navigator.userAgent;
let app = window.navigator.appVersion;
if(!!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
var currentPosition, timer;
var speed = 1;
timer = setInterval(function() {
currentPosition = document.documentElement.scrollTop || document.body.scrollTop;
currentPosition -= speed;
window.scrollTo(0, currentPosition);
currentPosition += speed;
window.scrollTo(0, currentPosition);
clearInterval(timer);
}, 100);
} else if(ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1) {
}
})