blob: ca0c2180a7878a116615c23f3712bfc037de6f14 [file] [log] [blame]
<p>This tests for a bug in InsertParagraph where it would split and clone a &lt;form&gt; element in the same way it would a &lt;p&gt; or a &lt;div&gt;. You should see two paragraphs below both inside the form (blue bordered) element.</p>
<div id="div" contenteditable="true"><form style="border: 1px solid blue;"><input type="text">xx<input type="text"></form></div>
<script>
div = document.getElementById("div");
form = div.childNodes[0];
text = form.childNodes[1];
window.getSelection().setPosition(text, 1);
document.execCommand("InsertParagraph");
</script>