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>
|
|
|
|
<textarea id="t" rows="4">
|
|
|
|
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('RIGHT'); // now after "A"
|
|
|
|
sendKey('RIGHT'); //
|
|
|
|
sendKey('RIGHT'); //
|
|
|
|
sendKey('RIGHT'); // now at the last line
|
2010-02-09 19:09:59 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|