-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
The WPT in pointerevents/ is failing in all browsers, and it is not clear if the assertions in the test are spec-compliant.
Let's look at the first sub-test there for ease of discussion. Once we are confident what to expect there, hopefully other sub-tests will be trivial:
In the first sub-test "mouse events with remove-slot at pointerdown", we start with the following HTML where #slot is filled with #filler.
<div id="host">
<template id="template" shadowrootmode="open">
<style>
div {
width: 100px;
height: 100px;
}
</style>
<div id="parent">
<slot id="slot">
<div></div>
</slot>
</div>
</template>
<div id="filler"></div>
</div>Then at pointerdown on #filler, #slot is deleted from the shadow-tree. At this point:
#fillerbecomes hidden while remaining connected to the light-DOM, and- the mouse pointer hovers on
#parent(the shadow root).
Finally, at pointerup, the event is sent to #parent in all browsers.
Now let's look at two specific differences:
-
Because of the first bullet above, I would expect
pointeroutandpointerleaveevents getting dispatched to#filler. Chrome and Safari dispatch them, Firefox does not. What does the spec want in this case? -
Because of the second bullet above, all browsers send a
pointeroverevent to#parent. Chrome and Safari re-target this event to#hostand Firefox does not. In a private email thread, @smaug---- mentioned this is somehow related to [1] above. Could you please elaborate?