window.screenY always returns 0 on Safari and Chrome (Android and iOS).
I need to know the vertical position of the viewport in compare to the screen, on mobile devices, in browser.
Per MDN, Window.screenY should return it. It works fine on Firefox, but not on Chrome (Android or iOS) or Safari (iOS). I filed a bug on WebKit (https://bugs.webkit.org/show_bug.cgi?id=234256), but I wanted to see if anyone else has faced this or has any solution.
I can get this by subtracting clientY from screenY on a touch/click event. But I want this is general.
I have an element that I want to attach to the bottom of the window, but not all the way to the bottom of the screen. i.e. on Android's 3-button menus, the padding that gives to the bottom of the screen is great. However, with the Gesture Navigation on android, there is no bottom padding padding between the window and the screen.
I found no way to detect whether the use has "3-button Navigation buttons" or "Gestures Navigation". I am hoping to guess that by subtracting the screenY from window.screen.availHeight - window.innerHeight to get the equivalent of screenY for the bottom. (bottom padding between the window and the screen.)