Amit Hagin Amit Hagin - 1 year ago 78
Javascript Question

Detect mouseMove out event for HTML canvas element

mouseMove event is for moving on the canvas itself, but I can't detect when the mouse leaves the canvas.

Is there an option to detect when the mouse is moving out of the canvas?

Answer Source

Have you tried mouseout?

element.addEventListener ("mouseout", myFunction, false);