mousemove

Test page.

Events overview page.

The mousemove event fires when the user moves the mouse.

Event IE 5.5 IE 6 IE 7 IE8b1 FF 2 FF 3b5 Saf 3.0 Win Saf 3.1 Win Opera 9.26 Opera 9.5b Konqueror 3.5.7
On the window
No Yes Yes Minimal Yes

Is this event available on the window?

  • Opera allows registration on the window only when you use attachEvent.
On the document
Yes Yes Yes Incomplete Yes Yes

Is this event available on the document?

  • Opera 9.26 does not fire this event when you use addEventListener in the capturing phase.
On any element
Yes Yes Yes Incomplete Yes Yes

Is this event available on the document?

  • Opera 9.26 does not fire this event when you use addEventListener in the capturing phase.
Event bubbling
Yes Yes Yes Almost Yes

The event should bubble up.

  • When using attachEvent registration, Opera fires the event on the window before the event on the document. (The event isn’t available on the window in any other registration.)
Cancel bubble
Yes Yes Yes Yes Yes
FF and Op allow cancel capture
Event IE 5.5 IE 6 IE 7 IE8b1 FF 2 FF 3b5 Saf 3.0 Win Saf 3.1 Win Opera 9.26 Opera 9.5b Konqueror 3.5.7

Event continues firing

Sometimes the mousemove event continues firing even if the mouse does not move. This is not a browser bug, but an OS or maybe even hardware bug. Some optical mice keep on sending mousemove interrupts, even though they aren't moved.

In general this bug is easy to work around: just check the mouse position before doing anything (and you want to check the mouse position in just about any mousemove script, anyway.)