blob: 4ccf9c5cc17b54bdf25ff5a375505755c0d4d4dd [file] [log] [blame]
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
</script>
<p>This tests deletion when the caret is in an empty list item at the beginning of the document. It also makes sure that the style inside the empty list item is retained. You should see '<b>foo</b>' followed by a list item containing 'bar'.</p>
<div id="div" contenteditable="true"><ul><li id="start" style="font-weight:bold;"></li><li>bar</li></ul></div>
<script>
var s = window.getSelection();
var e = document.getElementById("start");
s.collapse(e, 0);
document.execCommand("Delete");
document.execCommand("InsertText", false, "foo");
</script>