The mobile input input box cannot scroll to the visual area immediately after gaining focus.

The

input input box cannot scroll to the visual area immediately after gaining focus, only after entering the content. How should I scroll to the visual area immediately after I want to gain focus?
31546620-5b081132-b024-11e7-851f-51c124bae16f.gif

Mar.20,2021

the solution is as follows:

window.addEventListener('resize', () => {
    const activeElement = document.activeElement
    if (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA') {
        setTimeout(() => {
          activeElement.scrollIntoView()
        }, 100)
      }
    })
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c13281-32e64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c13281-32e64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?