S
S
sanex33392015-05-11 15:06:04
css
sanex3339, 2015-05-11 15:06:04

How to correctly fix a bug in Android 4.2.1 native browser with offset at position fixed?

Faced a bug in the native browser of android 4.2.1
The bottom line is that if you set the element

position: fixed; 
top: 0; 
left: 0;
width: 100%;
height: 100%;

or
position: fixed; 
top: 0; 
left: 0;
bottom: 0;
right: 0;

Then this element is shifted up by the height of the address bar, respectively, if the element has a background, then a gap appears at the bottom of the window.
If this element is made hidden when the page is loaded, and 320-360 ms later it is displayed, then the element is positioned correctly.
How to fix this bug correctly without setTimeout of 350ms?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question