blob: 2a3bc63a12f173decbd79a16fd7b62516fa8e6e3 [file] [log] [blame]
mitz@apple.comfdf76622009-05-18 00:31:45 +00001<script src="resources/repaint.js" type="text/javascript"></script>
justingfea8b492006-06-16 00:45:02 +00002<script type="text/javascript">
3function repaintTest() {
4 var e = document.getElementById("removeme");
5 e.parentNode.removeChild(e);
6}
7</script>
8<body onload="runRepaintTest();" contenteditable="true">
9<p>This tests to see if selection gaps are invalidated properly when content inside the selection is removed. Only 'hello world' should have a selecton tint behind it.</p>
10<div id="test" style="width: 150px; border: 1px solid red; margin: 30px;">hello <span id="removeme"> world hello world hello world hello world hello world hello world hello world hello world hello</span> world<br></div>
11<script>
12var s = window.getSelection();
13var e = document.getElementById("test");
14s.setBaseAndExtent(e, 0, e, e.childNodes.length);
15</script>
16</body>