MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / onContextMenu

Function onContextMenu

lib/web/CodeMirror/src/edit/mouse_events.js:408–412  ·  view source on GitHub ↗
(cm, e)

Source from the content-addressed store, hash-verified

406// textarea (making it as unobtrusive as possible) to let the
407// right-click take effect on it.
408export function onContextMenu(cm, e) {
409 if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return
410 if (signalDOMEvent(cm, e, "contextmenu")) return
411 if (!captureRightClick) cm.display.input.onContextMenu(e)
412}
413
414function contextMenuInGutter(cm, e) {
415 if (!hasHandler(cm, "gutterContextMenu")) return false

Callers 1

registerEventHandlersFunction · 0.90

Calls 4

eventInWidgetFunction · 0.90
signalDOMEventFunction · 0.90
contextMenuInGutterFunction · 0.70
onContextMenuMethod · 0.45

Tested by

no test coverage detected