The pointercancel event target is defined as same as the other pointer events by "fire a pointer event".
If pointercancel is caused by staring a drag session of mouse, it follows dragstart and usually it's not captured by the pointer capture API. Therefore, the target should be considered by the second one of the definition, i.e., considered with a hit-testing.
In edge cases, another document may be under another document which is different from the document received the preceding pointerdown and dragstart. In this case, pointercancel event should be fired on:
- root element or the document node which received
pointerdown if the pointer is canceled outside the document
- the
<iframe> element if the pointer is over a child document
The reason is, pointercanel is required for aborting to handle the pointer maybe started by pointerdown event listener.
The
pointercancelevent target is defined as same as the other pointer events by "fire a pointer event".If
pointercancelis caused by staring a drag session of mouse, it followsdragstartand usually it's not captured by the pointer capture API. Therefore, the target should be considered by the second one of the definition, i.e., considered with a hit-testing.In edge cases, another document may be under another document which is different from the document received the preceding
pointerdownanddragstart. In this case,pointercancelevent should be fired on:pointerdownif the pointer is canceled outside the document<iframe>element if the pointer is over a child documentThe reason is,
pointercanelis required for aborting to handle the pointer maybe started bypointerdownevent listener.