blob: 9727cc42e0ce777739a0871deabc14f2578fcdfc [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<div contenteditable id="root"><span id="wrapper">First line<br>Second line</span></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description("This sets the selection to the middle of the first line, and hits the enter key.\n"
+ "Expected behavior: the text node is split at the cursor. The span is cloned, and everything "
+ "that was split out is placed inside the clone in a new div which is a child of the root. See bug 61594.");
var sel = window.getSelection();
sel.collapse(document.getElementById("wrapper").firstChild, 5);
document.execCommand("InsertParagraph", false, null);
Markup.dump(root);
</script>
</html>