Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 247013004: DevTools: [CodeMirror] fix context menu for text editor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/ContextMenu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
index 95980edef7cae35d9721090df841f493ffcbea22..d68146eb743c104860275e0c87026708bc2a9aa2 100644
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -159,7 +159,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.element.addEventListener("contextmenu", this._contextMenu.bind(this), false);
+ this._codeMirror.on("contextmenu", this._contextMenu.bind(this));
/**
* @this {WebInspector.CodeMirrorTextEditor}
*/
@@ -724,7 +724,7 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this.dispatchEventToListeners(WebInspector.TextEditor.Events.GutterClick, { lineNumber: lineNumber, event: event });
},
- _contextMenu: function(event)
+ _contextMenu: function(codeMirror, event)
{
var contextMenu = new WebInspector.ContextMenu(event);
var target = event.target.enclosingNodeOrSelfWithClass("CodeMirror-gutter-elt");
« no previous file with comments | « no previous file | Source/devtools/front_end/ContextMenu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698