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

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

Issue 2802963002: DevTools: Allow tab key to move focus when ConsolePrompt is empty (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
index 6bc94b351d5e722ba5db8ca44483345c8d3df32e..2d04f0837f8298d29144c58c66ef9a6800228c4c 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
@@ -53,7 +53,8 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
styleActiveLine: true,
indentUnit: 4,
lineWrapping: options.lineWrapping,
- lineWiseCopyCut: false
+ lineWiseCopyCut: false,
+ tabIndex: 0
});
this._codeMirrorElement = this.element.lastElementChild;
@@ -170,10 +171,8 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
/** @type {!Multimap<number, !TextEditor.CodeMirrorTextEditor.Decoration>} */
this._decorations = new Multimap();
- this.element.addEventListener('focus', this._handleElementFocus.bind(this), false);
einbinder 2017/04/06 07:42:34 Trying to manage focus ourselves doesn't play nice
this.element.addEventListener('keydown', this._handleKeyDown.bind(this), true);
this.element.addEventListener('keydown', this._handlePostKeyDown.bind(this), false);
- this.element.tabIndex = 0;
this._needsRefresh = true;
@@ -811,10 +810,6 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
return this._codeMirror.hasFocus();
}
- _handleElementFocus() {
- this._codeMirror.focus();
- }
-
/**
* @param {function()} operation
*/
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698