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

Unified Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 1233053002: Make random clicks in the debugger give the command line input focus. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: before submit Created 5 years, 5 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 | runtime/observatory/lib/src/elements/debugger.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/debugger.dart
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index 31f064ad2fd5b03a1efbaab89ea62a58c9f8eccc..7b9bc053afd758eb68d056b57e69fc6e6e41e3b7 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -1269,6 +1269,15 @@ class DebuggerPageElement extends ObservatoryElement {
app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent);
_debugSubscriptionFuture =
app.vm.listenEventStream(VM.kDebugStream, debugger.onEvent);
+
+ onClick.listen((event) {
+ // Random clicks should focus on the text box. If the user selects
+ // a range, don't interfere.
+ var selection = window.getSelection();
+ if (selection == null || selection.type == 'Caret') {
+ debugger.input.focus();
+ }
+ });
}
@override
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698