<p>This tests for a bug where InsertLineBreak would insert a '\n' instead of a <br> if the caret was set just before an input field. You should see two input fields each in its own paragraph below.</p> | |
<div id="div" contenteditable="true"><input type="text"><input type="text"></div> | |
<script> | |
div = document.getElementById("div"); | |
window.getSelection().setPosition(div, 1); | |
document.execCommand("InsertLineBreak"); | |
</script> |