blob: b4bee647a3f3af20a8862eda1a07999ee400e901 [file] [log] [blame]
<html>
<body>
<p>This tests to see that selected editable nodes that are not in both the start and end editable roots are cleared. You should see one non-editable piece and an editable one and then two empty table cells. The table cells are editable but are preserved and not removed because they are in a non-editable region. They should be completely cleared out, even the second one that contains a non-editable piece.</p>
<div id="div" contenteditable="true">
<table border="1" contenteditable="false">
<tr>
<td>Non-editable</td>
<td contenteditable="true">Editable <span id="start">content</span></td>
<!-- The following cell should be removed, even though it contains non-editable pieces. -->
<td contenteditable="true">Editable</td>
<td contenteditable="true">Edit<span contenteditable="false">(non-editable content that should be removed because its in an editable region)</span>able</td>
</tr>
</table>
Editable <span id="end">content</span>
</div>
<script>
var sel = window.getSelection();
var start = document.getElementById("start");
var end = document.getElementById("end");
sel.setBaseAndExtent(start, 0, end, 0);
document.execCommand("Delete");
</script>
</body>
</html>