blob: 44f262e1a122d4c7bc0c43ef420e285dc7603597 [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)
window.testRunner.dumpAsText();
edit = document.getElementById("edit");
text = edit.childNodes[1];
s = window.getSelection();
s.setPosition(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>