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

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: FocusRestorer Created 4 years, 3 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
Index: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
index d543b80e0d435be860b99c21cc80f35b11951e82..f3f28bcde3b0e70fe323dfbdf7d533f9c56da459 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
@@ -127,7 +127,7 @@ WebInspector.CodeMirrorUtils.prototype = {
var config = editingContext.config;
editingContext.cssLoadView = new WebInspector.CodeMirrorCSSLoadView();
editingContext.cssLoadView.show(element);
- WebInspector.setCurrentFocusElement(element);
+ element.focus();
element.addEventListener("copy", this._consumeCopy, false);
var codeMirror = new window.CodeMirror(element, {
mode: config.mode,

Powered by Google App Engine
This is Rietveld 408576698