Element: contextmenu event

The contextmenu event fires when the user attempts to open a context menu.

This event is typically triggered by clicking the right mouse button, or by pressing the context menu key. (In the latter case, the context menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row.)

Note that this event will occur with any non-disabled right-click event and does not depend on an element possessing the contextmenu attribute.

Bubbles Yes
Cancelable Yes
Interface MouseEvent
Event handler property oncontextmenu

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'contextmenu' in that specification.
Living Standard  

Browser compatibility

No compatibility data found. Please contribute data for "api.Element.contextmenu" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Last updated by: irenesmith,