blob: d1ac73a9b8291b58d97676cdbd24392600af9d63 [file] [log] [blame]
<p>This tests for a bug where copied links wouldn't be pasted as links at certain positions.</p>
<div id="div" contenteditable="true">This should be plain text.<div>This should be plain text.</div></div>
<script>
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, div.childNodes.length);
document.execCommand("InsertHTML", false, "<a href='http://www.google.com/'>This should be a link.</a>")
</script>