haikuwebkit/LayoutTests/editing/pasteboard/4806874.html

15 lines
461 B
HTML

<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>