You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 11, 2021. It is now read-only.
It looks doable to create a PointerEvent instead of an Event. The trickier part is getting the properties of the pointer at the time of the execution of element.setPointerCapture(), like pageX and pageY. Afaik, the only point where we store recent pointer events is dispatcher.pointermap, which contains the most recent mousedown event or particular touchstart properties.
Introducing tracking of the most recent mousemove and touchmove would get us closer to the actual value. Generally I would say the most recent mousedown \ touchstart is close enough, since the most common use case of a capture is to capture the movement of a pointer starting from the moment the pointer is pressed.
Though if one creates something fancy like: "Only capture, if the pointer has been dragged for over 2 seconds" or "only capture, if the pointer left a certain element", using the most recent pointerdown would be way off.
On the other hand, the setPointerCapture event is asynchronous, so maybe we can be somewhat lax about its properties.