| OLD | NEW |
| 1 <span>This test passes if the caret is at the start of the second line.</span> | 1 <span>This test passes if the caret is at the start of the second line.</span> |
| 2 | 2 |
| 3 <div id="edit" contentEditable="true" style="width: 350px; height: 100px; border
: 1px solid blue;">a </div> | 3 <div id="edit" contentEditable="true" style="width: 350px; height: 100px; border
: 1px solid blue;">a </div> |
| 4 <script> | 4 <script> |
| 5 var edit = document.getElementById("edit"); | 5 var edit = document.getElementById("edit"); |
| 6 edit.focus(); |
| 6 edit.appendChild(document.createTextNode("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx")); | 7 edit.appendChild(document.createTextNode("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx")); |
| 7 window.getSelection().collapse(edit.firstChild, 2); | 8 window.getSelection().collapse(edit.firstChild, 2); |
| 8 </script> | 9 </script> |
| OLD | NEW |