| <p>This tests for a bug where deleting everything in a paragraph of colored text would prevent the user from changing the text 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("SelectAll"); |
| document.execCommand("ForeColor", false, "red"); |
| document.execCommand("Delete"); |
| document.execCommand("InsertText", false, "This text should be red."); |
| document.execCommand("ForeColor", false, "blue"); |
| document.execCommand("InsertText", false, "This text should be blue."); |
| </script> |