Index: site/try/src/interaction_manager.dart |
=================================================================== |
--- site/try/src/interaction_manager.dart (revision 39473) |
+++ site/try/src/interaction_manager.dart (working copy) |
@@ -394,7 +394,13 @@ |
selection.collapse(text, offset + 1); |
} else if (node is Element) { |
node.appendText('\n\n'); |
- selection.collapse(node.firstChild, 1); |
+ if (node.firstChild is Text) { |
+ selection.collapse(node.firstChild, 1); |
+ } else { |
+ // This else-branch accomodates IE11, which |
+ // puts <BR> instead of '\n' in content-editable Divs. |
+ selection.collapse(node, 1); |
ahe
2014/08/22 09:46:52
How does this interact with getText in shadow_root
aam-me
2014/08/22 12:05:14
By the time we get to that getText <br>'s are gone
ahe
2014/08/22 12:13:44
In other words, this wouldn't work if IE supported
|
+ } |
} else { |
window.console |
..error('Unexpected node') |