1 <p>This tests for a hang when pasting underlined content at the end of a paragraph. You should see 'Hello <u>World!</u>' below.</p>
3 <div id="div" contenteditable="true"><div>Hello </div></div>
6 var sel = window.getSelection();
7 var div = document.getElementById("div");
8 sel.setPosition(div, div.childNodes.length);
9 document.execCommand("InsertHTML", false, "<span style='text-decoration: underline;'><div>World!</div></span>");