How to solve the problem that the input box is covered by the mobile input method?

Dec.11,2021

adjust the input box up


the input box should always be on the top of the keyboard. Identify the height of the mobile keyboard, and then the input box always adapts to the keyboard height and appears at the top of the keyboard. You can refer to other APP practices.


listens to the focus event of input and sets the value of the page's scrollTop when the soft keyboard pops up, which ensures that the input box is on top of the soft keyboard. Then set the style back when you take back the soft keyboard

you should see a lot of sample code by casually searching, and here is an answer on the site that should be enough

site

Menu