H5 page, on ios, the input box is covered by the keyboard, how to solve it?

The

1.scrollView () method does not solve the problem that
2.js cannot get the height of the soft keyboard, and ios cannot trigger the resize event

Mar.02,2021

I've studied this problem before, and under iOS, you can solve it with scrollIntoView () .

for the Android platform, I assume by default that the height of the soft keyboard will not exceed half the height of the screen, so first use clickedElement.getBoundingClientRect (). Top to calculate the height of the clicked element from the top of the screen, and if the distance is less than half the height of the screen, use scrollTop () to move it up a certain distance. Because Android does not support the scrollBy () method during testing on an Android real machine, the scrollTop () method is used.

also organized into an article and put it here: Click the input box to automatically move the page up to the top of the soft keyboard .

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-1e471b0-27146.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-1e471b0-27146.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?