javascript - iphone safari browser input focus problem
PHPz
PHPz 2017-05-19 10:31:43
0
1
744

I limited the height of the web page to 100%, and absolutely positioned an input box at the bottom,

In Safari on iOS, when you click on the input box, the virtual keyboard can pop up and push the entire page up, but at least the input box is above the keyboard and can be seen.

But if the keyboard pops up through the focus of js, the keyboard will directly cover up part of the content at the bottom of the page, and the input box will be invisible. Why is focusing different from directly clicking on the input box? How to solve it? Does anyone know?

PHPz
PHPz

学习是最好的投资!

reply all(1)
阿神
    setTimeout(function() {
        document.body.scrollTop = document.body.scrollHeight;
    }, 300);
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template