2010-02-09 08:09:59 -08:00
|
|
|
<!DOCTYPE HTML><html><head>
|
2011-06-29 11:22:39 -07:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
2010-02-09 08:09:59 -08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
x<br>
|
2014-02-01 08:54:13 -08:00
|
|
|
<textarea id="t" rows="4" spellcheck="false" style="-moz-appearance: none">
|
2010-02-09 08:09:59 -08:00
|
|
|
A
|
|
|
|
|
|
|
|
|
|
|
|
</textarea><br>
|
|
|
|
y
|
|
|
|
<script>
|
|
|
|
// Position the caret at the last line
|
|
|
|
var sel = window.getSelection();
|
|
|
|
sel.removeAllRanges();
|
|
|
|
|
|
|
|
var area = document.getElementById('t');
|
|
|
|
area.focus();
|
|
|
|
|
2011-12-16 05:38:45 -08:00
|
|
|
sendKey('RIGHT'); // now after "A"
|
|
|
|
sendKey('RIGHT'); //
|
|
|
|
sendKey('RIGHT'); //
|
|
|
|
sendKey('RIGHT'); // now at the last line
|
2010-02-09 08:09:59 -08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|