<p>This test deletes the contents of a list, then it performs another delete, which should remove the empty list item. There should be two paragraphs below.</p> | |
<div id="div" contentEditable="true">Paragraph One.<ul><li id="li">bar</li></ul>Paragraph Two.</div> | |
<script> | |
var li = document.getElementById("li"); | |
var sel = window.getSelection(); | |
sel.setBaseAndExtent(li, 0, li, li.childNodes.length); | |
document.execCommand("Delete"); | |
document.execCommand("Delete"); | |
</script> |