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 has been 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.
The text was updated successfully, but these errors were encountered:
The
gotpointercapture
event caused byelement.setPointerCapture()
is currently a mereEvent
. The testpointerevent_gotpointercapture_before_first_pointerevent-manual
expects agotpointercapture
event to be a pointer event: https://github.com/w3c/web-platform-tests/blob/master/pointerevents/pointerevent_gotpointercapture_before_first_pointerevent-manual.html#L39.It looks doable to create a
PointerEvent
instead of anEvent
. The trickier part is getting the properties of the pointer at the time of the execution ofelement.setPointerCapture()
, likepageX
andpageY
. Afaik, the only point where we store recent pointer events isdispatcher.pointermap
, which contains the most recentmousedown
event or particulartouchstart
properties.Introducing tracking of the most recent
mousemove
andtouchmove
would get us closer to the actual value. Generally I would say the most recentmousedown
\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.The text was updated successfully, but these errors were encountered: