Home > Backend Development > PHP Tutorial > javascript - How to solve the problem of input getting focus and soft keyboard blocking input in Apple 5

javascript - How to solve the problem of input getting focus and soft keyboard blocking input in Apple 5

WBOY
Release: 2023-03-02 09:10:01
Original
1225 people have browsed it

Now I am encountering a problem that when the wap page gets focus on the iPhone 5 phone, it will block the input box. How to solve it?
javascript - How to solve the problem of input getting focus and soft keyboard blocking input in Apple 5

Reply content:

Now I am encountering a problem that when the wap page gets focus on the iPhone 5 phone, it will block the input box. How to solve it?
javascript - How to solve the problem of input getting focus and soft keyboard blocking input in Apple 5

Actually, @三月狠狠 is the solution, you can also refer to the weui demo. . .
javascript - How to solve the problem of input getting focus and soft keyboard blocking input in Apple 5

Why is it blocked? My personal guess is that you used percentages to write the positioning. If you want to write the positioning in percentages, don’t write 100% for the outermost html height. Use JS to give it the page height.

This is caused by position: fixed. Solution: Replace fixed with relative when getting focus

@马Crazy Don’t write in fixed format. It can be judged that moving the input box up when clicked is also a solution.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template