| document.getElementsByTagName("div")[0].focus(); |
| var sel = window.getSelection(); |
| var paragraphs = document.getElementsByTagName("p"); |
| sel.setBaseAndExtent(paragraphs[0].lastChild, 0, paragraphs[0].lastChild, 2); |
| document.execCommand("InsertHTML", false, '<p>No crash!</p>'); |
| sel.setBaseAndExtent(paragraphs[1].lastChild, 2, paragraphs[1].lastChild, 4); |
| document.execCommand("InsertHTML", false, '<p>No crash!</p>'); |
| sel.setBaseAndExtent(paragraphs[2].lastChild, 4, paragraphs[2].lastChild, 6); |
| document.execCommand("InsertHTML", false, '<p>No crash!</p>'); |
| sel.setBaseAndExtent(paragraphs[3].lastChild, 0, paragraphs[3].lastChild, 6); |
| document.execCommand("InsertHTML", false, '<p>No crash!</p>'); |
| <p><span style="white-space: pre"> </span>select </p> |
| <p><span style="white-space: pre"> </span>select </p> |
| <p><span style="white-space: pre"> </span>select </p> |
| <p><span style="white-space: pre"> </span>select </p> |