| <html> |
| <head> |
| <script src="resources/repaint.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| function repaintTest() |
| { |
| document.execCommand("Delete"); |
| } |
| </script> |
| </head> |
| <body onload="runRepaintTest()"> |
| <h4>Deleting into a nested block (was Radar 4056100)</h4> |
| <div style="width:400px;"> |
| The bug's symptom was that the visual result were two instances of the word "three", because the original was not erased. Resize cleared it up. |
| </div> |
| <hr> |
| <div contenteditable style="height: 100px;"> |
| <div id="one">one</div> |
| <div id="two"> |
| <div>two</div> |
| <div>three</div> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| var sel = window.getSelection(); |
| var one = document.getElementById("one"); |
| var two = document.getElementById("two"); |
| sel.setBaseAndExtent(one, 0, two, 2); |
| </script> |
| </body> |
| </html> |