| <p>This tests insertion before/after links that are also display:block. Insertion before/after display:block links should go inside the links so that text is inserted in the expected paragraph.</p> |
| <div id="div" contenteditable="true"><a href="http://www.google.com/" style="display:block;">all be</a></div> |
| |
| <script> |
| var sel = window.getSelection(); |
| var div = document.getElementById("div"); |
| sel.setPosition(div, 0); |
| |
| document.execCommand("InsertText", false, "This sentence should "); |
| |
| sel.setPosition(div, div.childNodes.length); |
| |
| document.execCommand("InsertText", false, " on one line."); |
| </script> |