blob: 23478c6ea478db4feb5c09f298e46cf1f8e1029a [file] [log] [blame]
<div id="description">This tests for a bug where moving the caret right towards a non-editable pocket of an editable region would make the caret disappear. The caret should be just after the 'y' in "Sally".</div>
<div id="edit" contenteditable="true"><span contenteditable="false">Bob</span> ; <span contenteditable="false">Sally</span></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
edit = document.getElementById("edit");
text = edit.childNodes[1];
s = window.getSelection();
s.collapse(text, text.length);
s.modify("move", "right", "character");
if (window.testRunner) {
var caretRect = textInputController.firstRectForCharacterRange(textInputController.selectedRange()[0], 0);
document.body.innerText = document.getElementById("description").innerText + "\n\nCaret: (" + caretRect[0] + ", " + caretRect[1] + ")";
}
</script>