| <p>This tests for a bug where text copied with Select All + Copy would lose its color.</p> |
| <div id="div" contenteditable="true"><br></div> |
| |
| <script> |
| var div = document.getElementById("div"); |
| div.focus(); |
| |
| document.execCommand("InsertText", false, "This text should be red."); |
| document.execCommand("InsertParagraph"); |
| document.execCommand("InsertText", false, "This text should be red."); |
| document.execCommand("SelectAll"); |
| document.execCommand("ForeColor", false, "red"); |
| document.execCommand("Copy"); |
| window.getSelection().modify("move", "forward", "character"); |
| document.execCommand("InsertParagraph"); |
| document.execCommand("Paste"); |
| </script> |