Closed Bug 1707991 Opened 4 years ago Closed 4 years ago

mousemove event fires erroneously after mouse leaves an element if the left mouse button is clicked

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 88
defect

Tracking

()

RESOLVED INVALID

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:

  1. Create an element A that is small and has a fixed height and width that is located inside a larger element.
  2. Add a mousemove event to element A. Make it console.log something.
  3. 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.

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.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

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.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.