I have two sections on my website, whose height I set to window.innerHeight
. When the resize event is fired the height is updated.
This works perfectly on my desktop, but on my android phone I get some problems.
In Chrome for android, if you scroll down so that the address bar gets hidden and the window size changes, Chrome fires a resize event and the height is updated.
Firefox and the default android browser don't fire this resize event after hiding the address bar. If I change the orientation of the device manually from portrait to landscape and back the height is updated like it should.
So I tried to dispatch an orientationchange event myself, but this didn't work.
Is there a way I can get Firefox and the default browser to behave like Chrome?
Here is the website.
window.innerHeight
is not updated.