Mobile pages often achieve such an effect. Look at the picture below. The focus is on the bottom of the fixed position. There is an input box inside. When inputting characters, the Android phone will see no problem at all!
1. The initial state of the page without clicking on the bottom input
2. The way it looks on an Android phone, everything is so normal and perfect.
3. Under the ios mobile phone, it is so willful, there is no way, it is completely blocked, blocked, blocked..., the entire page must be slid to You can only see it at the bottom, it's like hide and seek.
It’s not embarrassing to say that this problem has been solved for more than a year. What’s even more exciting and bloody is that the code only has one line!
Please open your eyes to see
<script type="text/javascript"> $("input").on("click", function() { setTimeout(function(){ document.body.scrollTop = document.body.scrollHeight; },300); }) </script>
I won’t take screenshots to show the specific real-life effects. You will be so surprised that you won’t know until you discover it and try it, right?
The above is the detailed content of How to solve the problem when the pop-up input method keyboard blocks input?. For more information, please follow other related articles on the PHP Chinese website!