Unnecessary `pointerover` and `pointerenter` events are fired after `dragstart`
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: sb3nder, Unassigned)
Details
Attachments
(1 file)
|
2.97 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0
Steps to reproduce:
- Open
drag-min.html. - Move mouse pointer over the
<div>(green). - With the mouse primary button, drag the
<div>outside<section>(gray).
Actual results:
- Observe log(:h = :hover, :a = :active):
pointerdown <DIV> SECTION:h DIV:h
dragstart <DIV> SECTION:a:h DIV:a:h
pointercancel <DIV> SECTION:a:h DIV:a:h
pointerout <DIV> SECTION:a:h DIV:a:h
pointerleave <DIV> SECTION:a:h DIV:a:h
pointerleave <SECTION> SECTION:a:h DIV:a:h
pointerover <DIV> SECTION:a:h DIV:a:h
pointerenter <SECTION> SECTION:a:h DIV:a:h
pointerenter <DIV> SECTION:a:h DIV:a:h
dragenter <DIV> SECTION:a:h DIV:a:h
...
dragend <DIV> SECTION:a:h DIV:a:h
pointermove <DIV> SECTION:a:h DIV:a:h
pointerout <DIV> SECTION:a:h DIV:a:h
pointerleave <DIV> SECTION:a:h DIV:a:h
pointerleave <SECTION> SECTION:a:h DIV:a:h
Expected results:
- Observe log:
pointerdown <DIV> SECTION:h DIV:h
dragstart <DIV> SECTION:a:h DIV:a:h
pointercancel <DIV> SECTION:h DIV:h (:active removed)
pointerout <DIV> (:hover removed)
pointerleave <DIV>
pointerleave <SECTION>
dragenter <DIV>
...
dragend <DIV>
It has been discussed a bit here: https://github.com/w3c/pointerevents/issues/555
I haven't included double-tap touch drag in this issue, as I believe it will be deprecated due to its lack of support for dragging <a> links.
Comment 1•8 months ago
|
||
Masayuki, does the expected result look right to you?
Comment 2•8 months ago
|
||
Yeah, I think so. According to a quick look of PointerBoundaryEvents:4,sync, the unnecessary pointerover and pointerenters are caused by a real pointermove. However, the pointermove is not fired on the content. I'm not sure how we block the pointermove during the drag. I mean, NotifyMouseOver needs to check the same things.
Comment 3•8 months ago
|
||
It seems that the pointermove is caused by a mousemove. Probably, that has already enqueued before APZC knows the pointer is canceled by a drag start.
I think BrowserChild should stop dispatching mouse events if and only if there is a drag session and the drag session is caused by the pointer. However, we do not store the pointer info of the session. So, I think we should make nsBaseDragSession store the pointerId at InitWith*().
Description
•