Amit Hagin
Amit Hagin

Reputation: 3236

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?

Upvotes: 10

Views: 16330

Answers (2)

KBoek
KBoek

Reputation: 5976

Here's a list of all mouse events that apply to html elements: http://www.w3schools.com/tags/ref_eventattributes.asp (scroll down to Mouse Events).

Upvotes: 1

Jonas
Jonas

Reputation: 128777

Have you tried mouseout?

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

Upvotes: 23

Related Questions