| OLD | NEW |
| (Empty) |
| 1 <script> | |
| 2 if (window.testRunner) | |
| 3 testRunner.dumpEditingCallbacks(); | |
| 4 </script> | |
| 5 <p>This tests for a bug when a selection is replaced by content with selectRepla
cement == true. Below, you should see 'A new link' and 'link' should be select
ed.</p> | |
| 6 <div id="test" contenteditable="true">A new link</div> | |
| 7 | |
| 8 <script> | |
| 9 var s = window.getSelection(); | |
| 10 var e = document.getElementById("test"); | |
| 11 | |
| 12 s.setBaseAndExtent(e.firstChild, 6, e.firstChild, 10); | |
| 13 document.execCommand("InsertHTML", false, "<a id='link' href='http://www.google.
com'>link</a>"); | |
| 14 e = document.getElementById("link"); | |
| 15 s.setBaseAndExtent(e.firstChild, 0, e.firstChild, 4); | |
| 16 </script> | |
| OLD | NEW |