blob: 07f45a6a71a0daeb2a912cd2e600c95eba9c9b39 [file] [log] [blame]
<p>This tests for an infinite loop on Paste. You should see 'Hello: ' and then an input field.</p>
<div id="div" contenteditable="true">Hello: </div>
<script>
if (window.internals)
internals.settings.setEditingBehavior("mac");
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
sel.modify("move", "forward", "word");
document.execCommand("InsertHTML", false, "<div><input type='text'></div>");
</script>