window.addEventListener(‘resize‘, function () { if(document.activeElement.tagName === ‘INPUT‘){ document.activeElement.scrollIntoView({behavior: "smooth"}) } })
移动键盘 滚动input
原文:https://www.cnblogs.com/chengyunshen/p/10240458.html