blob: 9099f560f1e15ce5079503e88b2f633c54efd1e6 [file] [log] [blame]
<p>This tests for a crash when pasting into a link that is display:block. 'bar' is pasted between 'foo' and 'baz', and must be part of the link in order to acheive the expected paragraph structure. It should be part of the link but of the default font style.</p>
<div id="div" contenteditable="true"><a id="anchor" href="http://www.google.com/" style="display:block;">foobaz</a></div>
<script>
var sel = window.getSelection();
var anchor = document.getElementById("anchor");
var text = anchor.firstChild;
sel.setPosition(text, 3);
document.execCommand("InsertHTML", false, "bar");
</script>