android 版本
function windowResize() {
var originalHeight = document.documentElement.clientHeight || document.body.clientHeight;
window.onresize = () => {
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight
if (resizeHeight - 0 < originalHeight - 0) {
} else {
this.adjustAndroidInput()
}
}
},
function adjustAndroidInput() {
setTimeout(() => {
document.activeElement.scrollIntoViewIfNeeded();
})
}
iphone 版本:
function iosInputBlur() {
setTimeout(() => {
window.scrollTo({top: 0, left: 0, behavior: 'smooth'})
}, 100)
},