| <p>This tests to make sure that inserting a line break in a hidden textarea doesn't crash. |
| To repro manually, press enter or return in the textarea. We pass if we don't crash.</p> |
| <textarea id="textarea"></textarea> |
| <div id="d2" contenteditable="true"> |
| document.addEventListener("keydown", function(e) { |
| document.getElementById("d").style.visibility = "hidden"; |
| document.getElementById("textarea").focus(); |
| document.execCommand('InsertParagraph', false, null); |
| document.getElementById("d2").focus(); |
| document.getElementById("d2").style.visibility = ""; |
| document.execCommand('InsertParagraph', false, null); |