1 <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>
2 <div id=
"div" contenteditable=
"true"><br></div>
5 var div
= document
.getElementById("div");
8 document
.execCommand("InsertText", false, "This text should be red.");
9 document
.execCommand("SelectAll");
10 document
.execCommand("ForeColor", false, "red");
11 document
.execCommand("Delete");
12 document
.execCommand("InsertText", false, "This text should be red.");
13 document
.execCommand("ForeColor", false, "blue");
14 document
.execCommand("InsertText", false, "This text should be blue.");