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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library debugger_page_element; 5 library debugger_page_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/cli.dart'; 10 import 'package:observatory/cli.dart';
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 stackElement.debugger = debugger; 1262 stackElement.debugger = debugger;
1263 debugger.console = $['console']; 1263 debugger.console = $['console'];
1264 debugger.input = $['commandline']; 1264 debugger.input = $['commandline'];
1265 debugger.input.debugger = debugger; 1265 debugger.input.debugger = debugger;
1266 debugger.init(); 1266 debugger.init();
1267 1267
1268 _isolateSubscriptionFuture = 1268 _isolateSubscriptionFuture =
1269 app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent); 1269 app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent);
1270 _debugSubscriptionFuture = 1270 _debugSubscriptionFuture =
1271 app.vm.listenEventStream(VM.kDebugStream, debugger.onEvent); 1271 app.vm.listenEventStream(VM.kDebugStream, debugger.onEvent);
1272
1273 onClick.listen((event) {
1274 // Random clicks should focus on the text box. If the user selects
1275 // a range, don't interfere.
1276 var selection = window.getSelection();
1277 if (selection == null || selection.type == 'Caret') {
1278 debugger.input.focus();
1279 }
1280 });
1272 } 1281 }
1273 1282
1274 @override 1283 @override
1275 void detached() { 1284 void detached() {
1276 cancelFutureSubscription(_isolateSubscriptionFuture); 1285 cancelFutureSubscription(_isolateSubscriptionFuture);
1277 _isolateSubscriptionFuture = null; 1286 _isolateSubscriptionFuture = null;
1278 cancelFutureSubscription(_debugSubscriptionFuture); 1287 cancelFutureSubscription(_debugSubscriptionFuture);
1279 _debugSubscriptionFuture = null; 1288 _debugSubscriptionFuture = null;
1280 super.detached(); 1289 super.detached();
1281 } 1290 }
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 }); 1740 });
1732 } 1741 }
1733 1742
1734 void focus() { 1743 void focus() {
1735 $['textBox'].focus(); 1744 $['textBox'].focus();
1736 } 1745 }
1737 1746
1738 DebuggerInputElement.created() : super.created(); 1747 DebuggerInputElement.created() : super.created();
1739 } 1748 }
1740 1749
OLDNEW
« 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