blob: d7c975e2d2d0edc5022954684bed3aefebae63ed [file] [log] [blame]
<p>This tests for a bug where a copied link wouldn't paste as a link. Both editable regions below should contain a link "Hello\nWorld".</p>
<div id="copy" contenteditable="true">
<a href="http://www.apple.com/">Hello<br>World</a>
</div>
<div id="paste" contenteditable="true"><br></div>
<script>
copy = document.getElementById("copy");
copy.focus();
document.execCommand("SelectAll");
document.execCommand("Copy");
paste = document.getElementById("paste");
paste.focus();
document.execCommand("Paste");
</script>