blob: 59aba1cdf751f892f1fdd1c995fa19b23d307ade [file] [log] [blame]
<script src="resources/repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest() {
document.execCommand("Delete");
}
</script>
<body onload="runRepaintTest();" contenteditable="true">
<p>This tests to see if selection gaps are removed when the selection is deleted. Nothing should be selected below. A caret should be inside the red div.</p>
<div id="test" style="width: 150px; border: 1px solid red; margin: 30px;">hello world hello world hello world hello world hello world hello world hello world hello world hello<br></div>
<script>
var s = window.getSelection();
var e = document.getElementById("test");
s.setBaseAndExtent(e, 0, e, e.childNodes.length);
</script>
</body>