<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
</script>
<p>This tests smart paste of a fragment that ends in a select element.  There should be spaces added before and after the inserted content.</p>
<div contenteditable="true" id="copy"><select><option>1</option><option>2</option><option>3</option></select></div>
<div contenteditable="true" id="paste">xx</div>

<script>
var copy = document.getElementById("copy");
doubleClick(copy.offsetLeft + copy.offsetWidth / 2, copy.offsetTop + copy.offsetHeight / 2);
document.execCommand("Copy");

var paste = document.getElementById("paste");
var sel = window.getSelection();
sel.setPosition(paste, 0);
sel.modify("move", "forward", "character");
document.execCommand("Paste");
</script>
