WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
287799
Synthetic PointerEvent.offsetX/Y ignore scroll position
https://bugs.webkit.org/show_bug.cgi?id=287799
Summary
Synthetic PointerEvent.offsetX/Y ignore scroll position
Yehonatan Daniv
Reported
2025-02-17 08:33:03 PST
I've created a reduced reproduction:
https://jsbin.com/qazizegafe/1/edit?html,css,js,output
Make sure you click "Run with JS" and scroll down to the target elements. When hovering the transparent target the offsetY value is correct. When hovering the semi-transparent yellow target the offsetY value is off by the amount of scrolled pixels of the container. Currently workarounds for this bug exist but they are taxing performance-wise, which is really hurting a WebGL-based product we're trying to build. This works correctly on Blink and Gecko, at least on my machine.
Attachments
Add attachment
proposed patch, testcase, etc.
Yehonatan Daniv
Comment 1
2025-02-17 09:09:34 PST
Seems to be affecting only the root scroller:
https://jsbin.com/nomehefuxo/1/edit?html,css,js,output
Also you can see in the link above that pageY is also affected the same way, as in not taking the window.scrollY into account.
Yehonatan Daniv
Comment 2
2025-02-18 06:30:46 PST
Probably related, Blink seem to be wrong when reporting pageX/Y on same scenario:
https://issues.chromium.org/issues/397377457
Yehonatan Daniv
Comment 3
2025-02-19 09:38:00 PST
This issue and related spec change that's mentioned there is probably related:
https://github.com/w3c/csswg-drafts/issues/8531
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