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

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

Issue 306023015: DevTools: [CodeMirror] show native copy/paste/cut items in editor context menu (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698