blob: 2d912cd83e5d87cfd4539027b97545752e7e6429 [file] [log] [blame]
<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>