contextmenu

Test page.

Events overview page.

The contextmenu event fires when the user calls the context menu by right-clicking.

Its purpose is to allow web developers to disable the context menu. (Why do people want to do that? I have no idea.)

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 No No No

Is the contexmenu event available on the window?

On the document
Yes Yes Yes No No

Is the contexmenu event available on the document?

On any element
Yes Yes Yes No No

Is the contexmenu event available on any element?

Event bubbling

The event should bubble.

Yes Yes Yes Untestable Untestable
Cancel bubble
Yes Too many Yes Untestable Untestable
  • When you cancel the bubble in Firefox, the event fires twice on its target.
Prevent default

The point of this event: can you suppress the context menu? Should be possible.

Yes No Yes Buggy Yes Untestable Untestable
  • Firefox 3 prevents the default when you cancel the bubbling, and not when you try to prevent the default.
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