This is for HTML5 / Javascript WebApp, not for native Android app.
How do I prevent the browser / DOM from resizing my content (which is responsive, mostly vw / vh for sizes, etc.) when the Android open soft keyboard is opened? It happens that the content, especially the font size, changes after the keyboard is opened (for example, for input fields).
I have already installed
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
I want to make the keyboard act like an overlay, and the content under it becomes scrollable. So basically what android:windowSoftInputMode will do in the android manifest.
I also tried to listen for the window resize event and prevent it when the resize is in a certain range (see this answer for another question). But what happens here, the keyboard opens and immediately after closing. (*)
So my main ideas:
- prevent the browser from calculating new sizes (as if there were no resizing)
- set the keyboard as an overlay, not a separate window resizing element.
- keep your keyboard open in my already proven resizing method (*)
But I can not find a solution for any of them.
javascript android html html5
Decay42
source share