Hello to my fellow developers.
I'm building a web application and I'm having problems with Firefox browser on Android. When I click to a text field, the soft keyboard pops up and it resizes my whole window, destroying my css layout.
I managed to overcome this problem with Android Chrome, with the following script:
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width,height='+window.innerHeight+', initial-scale=1.0';
document.getElementsByTagName('head')[0].appendChild(meta);
However, it seems that Firefox browser is not following the above and keeps resizing my window.
Please, don't confuse my question with a native android application, I'm talking about a web application, just HTML, CSS, JavaScript
Thank you all for your time.
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With