Index: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
index 1557c3c9406f09c1f5cf83d13afbf7d0fb9572da..c467285930105afd22c95eb8442fcdd5669b8a73 100644 |
--- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
+++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
@@ -139,7 +139,7 @@ WebInspector.CodeMirrorTextEditor = function(url, delegate) |
this._codeMirror.on("beforeSelectionChange", this._beforeSelectionChange.bind(this)); |
this._codeMirror.on("scroll", this._scroll.bind(this)); |
this._codeMirror.on("focus", this._focus.bind(this)); |
- this._codeMirror.on("contextmenu", this._contextMenu.bind(this)); |
+ this.element.addEventListener("contextmenu", this._contextMenu.bind(this), false); |
/** |
* @this {WebInspector.CodeMirrorTextEditor} |
*/ |
@@ -721,7 +721,7 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
this.dispatchEventToListeners(WebInspector.TextEditor.Events.GutterClick, { lineNumber: lineNumber, event: event }); |
}, |
- _contextMenu: function(codeMirror, event) |
+ _contextMenu: function(event) |
{ |
var contextMenu = new WebInspector.ContextMenu(event); |
var target = event.target.enclosingNodeOrSelfWithClass("CodeMirror-gutter-elt"); |