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

Unified Diff: dart/site/try/src/interaction_manager.dart

Issue 266293002: Make Try Dart tests run on Firefox. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r35787 Created 6 years, 7 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 | « dart/site/try/src/editor.dart ('k') | dart/site/try/src/selection.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/interaction_manager.dart
diff --git a/dart/site/try/src/interaction_manager.dart b/dart/site/try/src/interaction_manager.dart
index 2a92fe16d78625cdef33361f1c4bbd935a0e3e6d..5b309a96cbcbe2fff1d870ac2d033120d9539b94 100644
--- a/dart/site/try/src/interaction_manager.dart
+++ b/dart/site/try/src/interaction_manager.dart
@@ -55,7 +55,8 @@ import 'compilation_unit.dart' show
CompilationUnit;
import 'selection.dart' show
- TrySelection;
+ TrySelection,
+ isCollapsed;
import 'editor.dart' as editor;
@@ -229,7 +230,7 @@ class InitialState extends InteractionState {
case KeyCode.ENTER: {
event.preventDefault();
Selection selection = window.getSelection();
- if (selection.isCollapsed && selection.anchorNode is Text) {
+ if (isCollapsed(selection) && selection.anchorNode is Text) {
Text text = selection.anchorNode;
int offset = selection.anchorOffset;
text.insertData(offset, '\n');
« no previous file with comments | « dart/site/try/src/editor.dart ('k') | dart/site/try/src/selection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698