2010-12-06 22:30:05 -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-12-06 22:30:05 -08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<textarea id="target" style="height: 100px"
|
|
|
|
onkeydown="this.style.display='block';this.style.height='200px';">foo</textarea>
|
|
|
|
<script>
|
|
|
|
var t = document.querySelector("textarea");
|
|
|
|
t.focus();
|
2011-05-12 06:52:38 -07:00
|
|
|
t.selectionStart = t.selectionEnd = t.value.length;
|
2011-12-16 05:38:45 -08:00
|
|
|
sendKey('ENTER');
|
2010-12-06 22:30:05 -08:00
|
|
|
document.body.appendChild(document.createTextNode(t.selectionStart + " - " + t.selectionEnd));
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|