window.addEventListener('resize', function () { if(document.activeElement.tagName === 'INPUT'){ document.activeElement.scrollIntoView({behavior: "smooth"}) } })