Closed Bug 1871988 Opened 9 months ago Closed 9 months ago

Pointer event offsetX and offsetY are zeroed once the event has been processed

Categories

(Core :: DOM: Events, defect)

Firefox 121
defect

Tracking

()

RESOLVED DUPLICATE of bug 1359440

People

(Reporter: nige.animal, Unassigned)

Details

Attachments

(1 file)

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.

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.

Component: Untriaged → Debugger
Product: Firefox → DevTools

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.

Component: Debugger → DOM: Events
Product: DevTools → Core
Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1359440
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: