blob: 68fa0d232751fa45b2c5854dbbfb6e897562bfc1 [file] [log] [blame]
<p>
Test for <i><a href="rdar://problem/5973313">rdar://problem/5973313</a>
REGRESSION (r32508): Down arrow doesn't change caret with non-user entered newlines in textareas</i>.
</p>
<p>
To test manually, click to the right of the first word on the first line to place
the caret at the end of the line, then press the down arrow. The caret should move
to the next (empty) line. Then click somewhere on that line. The caret should not
stay there.
</p>
<div id="target" style="border: solid red; -webkit-user-modify: read-write; white-space: pre;">Lorem
ipsum</div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpEditingCallbacks();
var target = document.getElementById("target");
var x = target.offsetParent.offsetLeft + target.offsetLeft;
var y = target.offsetParent.offsetTop + target.offsetTop;
eventSender.mouseMoveTo(x + target.offsetWidth - 10, y + 2);
eventSender.mouseDown();
eventSender.mouseUp();
getSelection().modify("move", "forward", "line");
eventSender.mouseMoveTo(x + target.offsetWidth - 10, y + target.offsetHeight / 2);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>