WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
234256
window.screenY is always 0 on mobile devices
https://bugs.webkit.org/show_bug.cgi?id=234256
Summary
window.screenY is always 0 on mobile devices
Aidin NasiriShargh
Reported
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Aidin NasiriShargh
Comment 1
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
Radar WebKit Bug Importer
Comment 2
2021-12-20 11:16:15 PST
<
rdar://problem/86732718
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug