blob: 743d3edc248b1ea8f6688529a2fb7e092c918d11 [file] [log] [blame]
<div id="description">This tests for a bug where moving the caret left towards a non-editable pocket of an editable region would make the caret disappear. The caret should be just after the 'b' in "Bob".</div>
<div id="edit" contenteditable="true"><span contenteditable="false">Bob</span> ; <span contenteditable="false">Sally</span></div>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
edit = document.getElementById("edit");
text = edit.childNodes[1];
s = window.getSelection();
s.setPosition(text, 0);
s.modify("move", "left", "character");
if (window.layoutTestController)
document.body.innerText = document.getElementById("description").innerText + "\n\nCaret One: (\"" + s.anchorNode.data + "\", " + s.anchorOffset + ")";
</script>