Android bottom menu is input method top solution

Android phone input method pops up and disappears, which will trigger

For the window.onresize event, our general solution is to get the focus, hide the bottom, lose the focus, and the bottom menu appears. However, some people will click this button to put away the key card

Well, at this time, your loss of focus is invalid. Another way is to put position: fixed; Change to position: absoult; In this way, the bottom menu will not be pushed up, but after my experiment, this method will still be pushed up by the input method. Neither of these two methods can completely solve the problem. Another is the problem of layout. The main page: position: relative, and the bottom menu: position: absoult; This method is useful for a certain period of time. I have used these methods when shopping around, and all the results are tested back. This bug can only be solved. After all, some Virgos can't stand this problem and write so much nonsense. The following solution is posted: compatible with Android and apple:

Android phones. Hide events for this input method

The Android phone has this event, but the iPhone does not. If the iPhone clicks this button, the input box will lose focus

Note: those who are addicted to code cleanliness can see the following code and the previous code. The problem that the bottom menu is topped by the input method has been solved

In addition, the input box is to focus. When the bottom menu appears, the bottom menu will pop up and then pop down. Generally, some people will not tolerate it. We need to change the style of the bottom when we lose the focus. Sometimes the style of the bottom may be different on Android and iPhone. At this time, we need to judge the phone type to modify the style.

The above is the solution that Xiaobian introduced to you that the bottom menu in Android is pushed up by the input method. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>