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
|Event handler property||
|HTML Living Standard
The definition of 'contextmenu' in that specification.
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Edge||Opera||Safari|
|On disabled form elements||(Yes)||No support||(Yes)||No support||(Yes)||?|
|Feature||Android||Edge||Firefox Mobile (Gecko)||IE Mobile||Opera Mobile||Safari Mobile|
|On disabled form elements||?||No support||?||?||?||?|
In Gecko this event is handled by an XUL ancestor element, even for HTML5 context menus, which are actually handled by the browser element's context menu. If an XUL ancestor element has a
contextmenu attribute referencing a popup, then it will display when this event occurs (subject to the