Skip to content

Expectations in pointerevent_after_target_removed_from_slot.html #56614

@mustaqahmed

Description

@mustaqahmed

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:

  • #filler becomes 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:

  1. Because of the first bullet above, I would expect pointerout and pointerleave events getting dispatched to #filler. Chrome and Safari dispatch them, Firefox does not. What does the spec want in this case?

  2. Because of the second bullet above, all browsers send a pointerover event to #parent. Chrome and Safari re-target this event to #host and Firefox does not. In a private email thread, @smaug---- mentioned this is somehow related to [1] above. Could you please elaborate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions