2010-02-09 19:09:59 +03:00
|
|
|
<!DOCTYPE HTML><html><head>
|
2011-06-29 22:22:39 +04:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
2010-02-09 19:09:59 +03:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
x<br>
|
2014-01-24 18:18:00 +04:00
|
|
|
<textarea id="t" rows="4" spellcheck="false">
|
2010-02-09 19:09:59 +03: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 17:38:45 +04:00
|
|
|
sendKey('DOWN'); // now after "A"
|
|
|
|
sendKey('DOWN'); //
|
|
|
|
sendKey('DOWN'); // now at the last line
|
2010-02-09 19:09:59 +03:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|