| OLD | NEW |
| (Empty) |
| 1 <p>This tests moving backward by sentence boundaries. The caret should be at th
e start of the second to last sentence.</p> | |
| 2 | |
| 3 <div id="div" contenteditable="true">Lorem ipsum dolor sit amet, consectetuer ad
ipiscing elit. Nunc a augue. Pellentesque habitant morbi tristique senectus et n
etus et malesuada fames ac turpis egestas. Mauris ut pede. Integer lacus. Ut ips
um. Phasellus tristique leo eu velit. Vestibulum arcu lacus, blandit ac, condime
ntum sed, commodo in, arcu. Curabitur suscipit pede eu sem.</div> | |
| 4 | |
| 5 <script> | |
| 6 var sel = window.getSelection(); | |
| 7 var div = document.getElementById("div"); | |
| 8 var text = div.firstChild; | |
| 9 sel.collapse(text, text.length - 5); | |
| 10 sel.modify("move", "backward", "sentenceBoundary"); | |
| 11 sel.modify("move", "backward", "sentenceBoundary"); | |
| 12 </script> | |
| OLD | NEW |