[pointerevents] Immediately firing coalesced events for enter/leave/over/out? (#278)

ChumpChief has just created a new issue for https://github.com/w3c/pointerevents:

== Immediately firing coalesced events for enter/leave/over/out? ==
The [section on coalesced event firing](https://w3c.github.io/pointerevents/extension.html#timing-of-coalesced-event-firing) specifies that the coalesced events will be fired before pointerdown/up/cancel.  Seems they should also be fired before pointerenter/leave/over/out?  I think perhaps this is a natural artifact that rAF-aligned input only included down/up/cancel as immediate-dispatching events, so maybe this is really just feedback that enter/leave/over/out should have also been included in the list of events immediately dispatched with rAF-aligned input.

Unpleasant consequences of not doing this:

1. An element will not directly receive the last few events targeting it before the pointer moves out of its bounds, since those events will be coalesced and targeted to the element that it enters instead.  Reassigning those events back to their original target is additional overhead and potentially unfeasible for component authors.  This is the most painful issue I think.
2. When retrieving a list of coalesced events, the author needs to be aware that they may not all target the same element that was targeted by the coalesced event.  Authors using getCoalescedEvents must do their own filtering of the list on target if this matters to them.
3. Reconstructing the sequence of events seems burdensome to impossible.  At most only a single enter/leave event is fired after coalescing even if the boundary is crossed multiple times, and the timestamp will be at the coalesced time.  Examining target changes in the list of coalesced events could help, but if a portion of the pointer path passes through an area with no move listeners registered then the enter/leave will not be evident as no move events will be added to the list for that region.

Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/278 using your GitHub account

Received on Friday, 22 February 2019 18:14:43 UTC