| <script src="resources/repaint.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| function repaintTest() { |
| var e = document.getElementById("removeme"); |
| e.parentNode.removeChild(e); |
| } |
| </script> |
| <body onload="runRepaintTest();" contenteditable="true"> |
| <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> |
| <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> |
| <script> |
| var s = window.getSelection(); |
| var e = document.getElementById("test"); |
| s.setBaseAndExtent(e, 0, e, e.childNodes.length); |
| </script> |
| </body> |