I have an absolutely-positioned div, and I\'m trying to keep track of when the mouse moves over it, and when the mouse leaves. Unfortunately clicking on the text in the box
I also ran into this bug. In my case, I added label wrapped checkboxes into a list, and wrapped the list in a div. I also used some list items that were
tags. If you click around the checkboxes and labels quickly you will occasionally trigger a mouseleave
event on the wrapping div. This shouldn't occur as all clicked elements are children of the div.wrapper
.
...
wrapper.addEventListener(
'mouseleave',
(e) => {
logger('mouseleave fired');
console.log('mouseleave fired', e);
},
false
);
...
jsfiddle demo
Here's a gif of the reproduction. Click within the clue area (granted with some intensity and movement), click events from the label and input boxes are firing and then you see two mouseleave events fire in error, and then a third when the mouse truly leaves the blue area.