mousemove event fires erroneously after mouse leaves an element if the left mouse button is clicked
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: raymondleon, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0
Steps to reproduce:
- Create an element A that is small and has a fixed height and width that is located inside a larger element.
- Add a mousemove event to element A. Make it console.log something.
- Left click on element A and move the mouse slowly until it is out of element A's boundaries. You will see that even after the mouse leaves the element's bounding box, the mousemove event for that element continues to fire. The mousemove event should only fire while the mouse is inside of element A.
If you don't left click inside element A, the mousemove event fires only while inside element A.
Actual results:
mousemove events continue to fire even after the mouse leaves the bounding box of element A if the mouse button was clicked down inside element A when the a mouse drag was initiated
Expected results:
mousemove events should stop firing after the mouse leaves the bounding box, like in Safari.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Comment 2•4 years ago
|
||
I believe now that this is not a bug. According to https://w3c.github.io/uievents/#event-type-mousemove, this behaviour can be considered correct.
Description
•