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

Side by Side Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 1275543004: Resolve some input focus issues for the debugger. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | no next file » | 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 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 app.vm.listenEventStream(VM.kStderrStream, debugger.onStderr); 1477 app.vm.listenEventStream(VM.kStderrStream, debugger.onStderr);
1478 _logSubscriptionFuture = 1478 _logSubscriptionFuture =
1479 app.vm.listenEventStream(Isolate.kLoggingStream, debugger.onEvent); 1479 app.vm.listenEventStream(Isolate.kLoggingStream, debugger.onEvent);
1480 // Turn on the periodic poll timer for this page. 1480 // Turn on the periodic poll timer for this page.
1481 pollPeriod = const Duration(milliseconds:100); 1481 pollPeriod = const Duration(milliseconds:100);
1482 1482
1483 onClick.listen((event) { 1483 onClick.listen((event) {
1484 // Random clicks should focus on the text box. If the user selects 1484 // Random clicks should focus on the text box. If the user selects
1485 // a range, don't interfere. 1485 // a range, don't interfere.
1486 var selection = window.getSelection(); 1486 var selection = window.getSelection();
1487 if (selection == null || selection.type == 'Caret') { 1487 if (selection == null ||
1488 (selection.type != 'Range' && selection.type != 'text')) {
1488 debugger.input.focus(); 1489 debugger.input.focus();
1489 } 1490 }
1490 }); 1491 });
1491 } 1492 }
1492 1493
1493 void onPoll() { 1494 void onPoll() {
1494 debugger.flushStdio(); 1495 debugger.flushStdio();
1495 } 1496 }
1496 1497
1497 @override 1498 @override
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 } 2007 }
2007 }); 2008 });
2008 } 2009 }
2009 2010
2010 void focus() { 2011 void focus() {
2011 $['textBox'].focus(); 2012 $['textBox'].focus();
2012 } 2013 }
2013 2014
2014 DebuggerInputElement.created() : super.created(); 2015 DebuggerInputElement.created() : super.created();
2015 } 2016 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698