| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip
t> | 3 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip
t> |
| 4 <script type="text/javascript"> | 4 <script type="text/javascript"> |
| 5 function repaintTest() | 5 function repaintTest() |
| 6 { | 6 { |
| 7 document.execCommand("Delete"); | 7 document.execCommand("Delete"); |
| 8 } | 8 } |
| 9 </script> | 9 </script> |
| 10 </head> | 10 </head> |
| 11 <body onload="runRepaintAndPixelTest()"> | 11 <body onload="runRepaintAndPixelTest()"> |
| 12 <h4>Deleting into a nested block (was Radar 4056100)</h4> | 12 <h4>Deleting into a nested block (was Radar 4056100)</h4> |
| 13 <div style="width:400px;"> | 13 <div style="width:400px;"> |
| 14 The bug's symptom was that the visual result were two instances of the w
ord "three", because the original was not erased. Resize cleared it up. | 14 The bug's symptom was that the visual result were two instances of the w
ord "three", because the original was not erased. Resize cleared it up. |
| 15 </div> | 15 </div> |
| 16 <hr> | 16 <hr> |
| 17 <div contenteditable style="height: 100px;"> | 17 <div contenteditable style="height: 100px;"> |
| 18 <div id="one">one</div> | 18 <div id="one">one</div> |
| 19 <div id="two"> | 19 <div id="two"> |
| 20 <div>two</div> | 20 <div>two</div> |
| 21 <div>three</div> | 21 <div>three</div> |
| 22 </div> | 22 </div> |
| 23 </div> | 23 </div> |
| 24 <script type="text/javascript"> | 24 <script type="text/javascript"> |
| 25 var sel = window.getSelection(); | 25 var sel = window.getSelection(); |
| 26 var one = document.getElementById("one"); | 26 var one = document.getElementById("one"); |
| 27 var two = document.getElementById("two"); | 27 var two = document.getElementById("two"); |
| 28 one.parentNode.focus(); |
| 28 sel.setBaseAndExtent(one, 0, two, 2); | 29 sel.setBaseAndExtent(one, 0, two, 2); |
| 29 </script> | 30 </script> |
| 30 </body> | 31 </body> |
| 31 </html> | 32 </html> |
| OLD | NEW |