Bug 234256

Summary: window.screenY is always 0 on mobile devices
Product: WebKit Reporter: Aidin NasiriShargh <aideen>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, joone, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=171841

Description Aidin NasiriShargh 2021-12-13 11:15:27 PST
window.screenY (https://developer.mozilla.org/en-US/docs/Web/API/Window/screenY) is supposed to return the vertical distance, in CSS pixels, of the top border of the user's browser viewport to the top edge of the screen.

On mobile devices (Chrome 96 on Android and iOS + Safari on iOS) it always returns 0.  Firefox (Gecko) on Android, however, returns a non-zero value (53 in my case) which is properly the height of the addressbar and other things between the top of the window and top of the screen.

PS. I can get this by subtracting event.clientY and event.screenY on touch/click events.  But I want it on non-event contexts as well.
Comment 1 Aidin NasiriShargh 2021-12-13 11:28:13 PST
PS. I asked it in stackoverflow too, and shared the background of my problem: https://stackoverflow.com/q/70339906
Comment 2 Radar WebKit Bug Importer 2021-12-20 11:16:15 PST
<rdar://problem/86732718>