blob: 0ae72d9f6c011f41b09266e2f34da56c26fcea8a [file] [log] [blame]
<p>This tests for a deletion bug. Only the second paragraph inside the table should be deleted. You should see a table with 'foo' in it below.</p>
<div id="div" contenteditable="true"><table id="table" border="1"><tr><td id="td"><div>foo</div>bar</td></tr></table></div>
<p id="console"></p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(message) {
var console = document.getElementById("console");
var text = document.createTextNode(message);
console.appendChild(text);
}
table = document.getElementById("table");
td = document.getElementById("td");
text = td.firstChild.nextSibling;
s = window.getSelection();
s.setBaseAndExtent(text, 0, table, 1);
document.execCommand("Delete");
log(document.getElementById('div').innerHTML);
</script>