blob: 9d6955b6dc213e80cc6c54ea16b79dab887480b0 [file] [log] [blame]
<p>This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it it should be marked as misspelled.</p>
<div id="div" contenteditable="true"><br></div>
<script>
var div = document.getElementById("div");
div.focus();
document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
var selection = window.getSelection();
selection.modify("move", "backward", "character");
selection.modify("move", "backward", "character");
selection.modify("move", "backward", "character");
selection.modify("move", "backward", "character");
selection.modify("move", "backward", "character");
selection.modify("move", "backward", "character");
</script>