Closed
Bug 1457859
Opened 7 years ago
Closed 4 years ago
PointerEvent.getCoalescedEvents timeStamps are zero
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
RESOLVED
FIXED
86 Branch
| Tracking | Status | |
|---|---|---|
| firefox86 | --- | fixed |
People
(Reporter: mahlen, Assigned: smaug)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952
Steps to reproduce:
The steps to reproduce
1. Open firebug (or similar tool)
2. Apply the listener for pointermove, document.addEventListener("pointermove", (e) => { var c = e.getCoalescedEvents(); if (c) { console.log(e.timeStamp, c.map(x => x.timeStamp)) } }) that log the event's timeStamp and the timeStamps of the coalesced events.
3. Move the mouse in the page to trigger the event(s).
Actual results:
The logged events prints the handler's event timeStamp (milliseconds elapsed from the beginning of the current document's lifetime till the event was created) and the array of coalesced events all are zero.
Example:
2360 Array [ 0, 0, 0 ]
Expected results:
The coalesced events returned should have a timeStamp that represents the actual timing of the event, to follow the specification [1] and is also the behavior of Chromium.
Example:
2360 Array [ 2358, 2359, 2360 ]
[1] https://w3c.github.io/pointerevents/extension.html#x2-extensions-to-the-pointerevent-interface
| Assignee | ||
Updated•7 years ago
|
Priority: -- → P3
Comment 2•6 years ago
|
||
Just ran into this on https://canvas.apps.chrome/
As a workaround, I can check if timestamps are 0 and ignore the coalesced events, which reduces drawing precision. It would be better to have the full set of events though, especially if high-report-rate devices like styluses are supported in Firefox.
Updated•5 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Updated•4 years ago
|
Assignee: nobody → bugs
| Assignee | ||
Comment 3•4 years ago
|
||
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e991bb4bfba
PointerEvent.getCoalescedEvents timeStamps are zero, r=edgar
Comment 5•4 years ago
|
||
Thanks for looking at this, Olli!
Does this patch mean that all of the coalesced events will now have the same timestamp (that of the parent event) rather than 0? That's not a whole lot better from my perspective. My code will discard any events with duplicate timestamps (otherwise I end up calculating an infinite velocity between points!). It would be very useful for the coalesced events to have their original timestamps intact.
| Assignee | ||
Comment 6•4 years ago
|
||
They should have the timestamp they got when the (coalesced) event was created on OS level, so no duplicates unless the events occurred pretty much the same time.
Comment 7•4 years ago
|
||
Perfect, thank you!
Comment 8•4 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox86:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•