I have a perfectly working pair of animations on mouseenter and mouseleave.
The problem is on mouseenter, the hovered image moves away the pointer and the mouseleave event triggers, stuttering the image several times until the user re-positions the pointer where he guesses the image will land. Chasing the motion.
I tried stopping or not the current animation when the other event triggers
I tried unbinding and re-binding the other event only AFTER the current event's animation finishes…
The closest I got is the mouseleave waits until the mouseenter animation finishes… fine so far. No stuttering. BUT if you leave wile the mouseenter animation finishes, the mouseleave won't trigger because you are not "leaving" the image, and the event doesn't trigger because you "left" or "you are out".
So, again: if you are not there to chase the image and to be there there when the mouseenter animation finishes, you CAN'T be there to mouseleave it.
Mouseleave doesn't fire like a "the mouse moved and is not over the image".
I nead a way to DELAY the mouseleave "detection", not the "animation".
I need something getting aware of the past mouseleave, or awakening the detection even if I'm not moving the mouse.
The right event would be "if the mouse IS out NOW, regardless of it BEING leaving now or before"
Have you stumbled upon this scenario?