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.
Any right-click event that is not disabled (by calling the event's preventDefault()
method) will result in a contextmenu
event being fired at the targeted element.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | MouseEvent |
Event handler property | oncontextmenu |