Pointer event offsetX and offsetY are zeroed once the event has been processed
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: nige.animal, Unassigned)
Details
Attachments
(1 file)
1.29 MB,
image/gif
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Steps to reproduce:
See this Codepen. Have the debugger open, it logs to the console.
https://codepen.io/Animal-Nige/pen/wvOBYMv
Click the Pen document. The event's offsetX and offsetY are logged, and then logged again a few milliseconds later.
Actual results:
The events offsetX and offsetY are zeroed in the second log.
Expected results:
The offsetX and offsetY should be just as persistent as clientX, clientY and all the other details.
Blink and Webkit both persist the values. The two console.log statements display the same values.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Comment 2•1 year ago
|
||
The position upon scroll can only be recalculated if the offsets within the targetElement of the original event are preserved. I can work around this by caching them myself, but there's no reason to zero the offsets after the event has been processed.
Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Description
•