blob: bea887acaa4d3716431caf9d687b78323433b207 [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.setPosition(document.getElementById("wrapper").firstChild, 5);
document.execCommand("InsertParagraph", false, null);
Markup.dump(root);
</script>
</html>