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 |