blob: 3674472d1979a90f8a95b59d58ceb123d2b043c3 [file] [log] [blame]
<p>This tests for a bug where the color of pasted text couldn't be changed.'</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("Copy");
window.getSelection().modify("move", "forward", "character");
document.execCommand("InsertParagraph");
document.execCommand("Paste");
window.getSelection().modify("extend", "backward", "paragraphBoundary");
document.execCommand("ForeColor", false, "blue");
window.getSelection().modify("move", "forward", "character");
window.getSelection().modify("move", "backward", "word");
document.execCommand("ForeColor", false, "green");
document.execCommand("InsertText", false, "a combination of green and blue, not ");
</script>