The page automatically moves up when the input box or any input box in the mobile-side MUI Frame is focused

Source: Internet
Author: User

First, after clicking Input in the MUI frame, the page automatically moves up when the Android phone pops up with the input keyboard.

Implementation method:

(1) Just put the input tag in the Mui-content class.

<class= "mui-content">    <... /> </ Div >

Note: In some cases not applicable, when the input tag is placed in the Mui-scroll, that is, mui-content and mui-scroll exist simultaneously not applicable

<Divclass= "Mui-content">    <Divclass= "Mui-scroll-wrapper">        <Divclass= "Mui-scroll">        <input... />           </Div>    </Div></Div>

(2) Use the JS method to solve, add in the body

<onresize= "Document.activeElement.scrollIntoView (true);" >

Note: Forms cannot add padding and margin styles, or rollback bounces

The page automatically moves up when the input box or any input box in the

Mobile-side MUI Frame is focused

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.