1 <p>This tests for a bug where hitting return after a line break in text that preserves newlines wouldn't do anything.
</p>
2 <div id=
"div" contenteditable=
"true" style=
"white-space: pre;">xxx
3 There should be an empty paragraph before this one, and the caret should be at the start of this paragraph.
</div>
5 var sel
= window
.getSelection();
6 var div
= document
.getElementById("div");
7 var text
= div
.firstChild
;
9 document
.execCommand("InsertParagraph");