H5键盘遮挡问题解决
window.addEventListener('resize', function () {
console.log('02');
if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
window.setTimeout(function () {
console.log('03');
document.activeElement.scrollIntoViewIfNeeded();
}, 0);
}
})
}
ruby前端观察