blob: 198a53f32a97e6bb9770bc65da5fea1fb047594e [file] [log] [blame]
<p>This tests for a bug when removing links from a selection with Unlink. There shouldn't be any links *inside the selection* below.</p>
<div contenteditable="true"><a href="http:://www.google.com/"><div>Hel<span id="start">lo</span></div></a><div><span id="end">W</span>orld!</div></div>
<script>
var start = document.getElementById("start");
var end = document.getElementById("end");
var sel = window.getSelection();
sel.setBaseAndExtent(start, 0, end, end.childNodes.length);
document.execCommand("Unlink");
</script>