Mobile - iOS - Safari - window.outerHeight returns 0

I have a problem with window.outerHeight.

It returns 0 when launched in the Safari browser on a mobile device. I tested it on Android (Chrome) and it works great.

I am on iOS9.

I want to know if there is a solution or alternative that is supported on older devices.

This is not a problem of time.

Open the following on your iPhone: http://jsfiddle.net/hfq0Ly1w/

alert(window.outerHeight);

You can see that there are many errors in Safari by checking the height properties on your phone:

http://ryanve.com/lab/dimensions/

Hurrah!

+4
source share
1 answer

Safari / -. , :

window.innerHeight

, . , .

, :

http://ryanve.com/lab/dimensions/

Android . JS .

.

+5

Source: https://habr.com/ru/post/1618553/


All Articles