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

Unified Diff: dart/site/try/src/editor.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/cache.dart ('k') | dart/site/try/src/interaction_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/editor.dart
diff --git a/dart/site/try/src/editor.dart b/dart/site/try/src/editor.dart
index d330a7b7446577641d0b633b3c5b743114753837..9072ef8cc561ac74b9d9ea7da32125f8110d74fc 100644
--- a/dart/site/try/src/editor.dart
+++ b/dart/site/try/src/editor.dart
@@ -27,6 +27,9 @@ import 'decoration.dart' show
info,
warning;
+import 'selection.dart' show
+ isCollapsed;
+
const String INDENT = '\u{a0}\u{a0}';
Set<String> seenIdentifiers;
@@ -106,7 +109,7 @@ num minSuggestionWidth = 0;
/// exists.
Element getElementAtSelection() {
Selection selection = window.getSelection();
- if (!selection.isCollapsed) return null;
+ if (!isCollapsed(selection)) return null;
var anchorNode = selection.anchorNode;
if (!mainEditorPane.contains(anchorNode)) return null;
if (mainEditorPane == anchorNode) return null;
« no previous file with comments | « dart/site/try/src/cache.dart ('k') | dart/site/try/src/interaction_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698