Ios reportedly does not support position: Fixed;

On Android, click the input box at the bottom of the page, the soft keyboard pops up, and the page moves up.

On ios, click the input box at the bottom of the page, the soft keyboard pops up, and the input box is no longer visible.

Very painful. Iscroll,jquery-moblie, absolute, fixe, static

It’s very complicated, a lot of changes…

It took me a long time to find a new way.

var u = navigator.userAgent, app = navigator.appVersion; var isiOS = !! u.match(/\(i[^;] +; ( U;) ? CPU.+Mac OS X/); If (isiOS) {$('textarea'). Focus (function () {window.setTimeout('scrollBottom()', 500); }); } function scrollBottom() { window.scrollTo(0, $('body').height()); }Copy the code

When the input box is in focus, wait 500 milliseconds (the time it takes for the keyboard to animate) to scroll to the bottom of the page.