IOS fixed positioning at the bottom of the input box, the keyboard that pops up when getting the focus to block the input, iosinput

Source: Internet
Author: User

IOS fixed positioning at the bottom of the input box, the keyboard that pops up when getting the focus to block the input, iosinput

Mobile pages often achieve this effect. Looking at the image below, the focus is on the bottom of the fixed positioning. There is an input box in it. When entering characters, there is no problem with the Android phone!

1. The initial status of input is not clicked at the bottom of the page.

2. Everything on the Android phone is so normal and perfect.

3. the ios Mobile phone is so capricious, there is no way to block it completely, block it, block it ..., you must slide the entire page to the bottom to see it.

I am not afraid of shame. I have finally been able to solve this problem for more than a year. What's more exciting and even more bloody is that the Code has only a special line!

Please open your eyes

<Script type = "text/javascript"> $ ("input "). on ("click", function () {setTimeout (function () {document. body. scrollTop = document. body. scrollHeight ;}, 300) ;}</script>

I won't show the actual results. I was surprised to find and try it before I knew it, right?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.