From bd9045f76fbba5b955f0bcab17db8bc5f11aabeb Mon Sep 17 00:00:00 2001 From: "ahe@google.com" Date: Wed, 9 Jul 2014 10:11:55 +0000 Subject: [PATCH] Fix problem that caused deletion of tokens with multiple diagnostics. R=johnniwinther@google.com Review URL: https://codereview.chromium.org//374363002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38081 260f80e4-7a28-3924-810f-c04153c831b5 --- site/try/src/editor.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/try/src/editor.dart b/site/try/src/editor.dart index afe92ab8b11..e8523d504e9 100644 --- a/site/try/src/editor.dart +++ b/site/try/src/editor.dart @@ -164,7 +164,7 @@ addDiagnostic(String kind, String message, int begin, int end) { Element parent = node.parent; if (parent.classes.contains("diagnostic") && !interaction.oldDiagnostics.contains(parent)) { - Element other = parent.lastChild; + Element other = parent.firstChild; other.remove(); SpanElement wrapper = new SpanElement(); wrapper.style