blob: 038fc0324566b8a48f40cf39206265f24e03a14b [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This test verifies that forward delete at the end of a table-cell is a no-op. The first dump verifies that the caret stays after 'abc'. The second dump verifies that the caret stays after 'def', and doesn't select the nested table.</p>
<div id="test" contenteditable="true"><table border="1"><tr><td id="first">abc</td><td id="second">def</td><td><table><tr><td>ghi</td><td>jkl</td></tr></table></td></tr></table></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.getElementById("description").innerText);
window.getSelection().collapse(document.getElementById("first").firstChild, 3);
document.execCommand("ForwardDelete");
Markup.dump("test");
window.getSelection().collapse(document.getElementById("second").firstChild, 3);
document.execCommand("ForwardDelete");
Markup.dump("test");
</script>
</body>
</html>