gecko-dev/layout/base/tests/bug664087-1-ref.html
Decky Coss b69450d2ea Bug 1287655 - place textarea/input cursor at end of text when initialized; r=smaug
MozReview-Commit-ID: 2srGXFmla07

--HG--
extra : transplant_source : %3Cn%D30%86%24%82%90%29%191%9C%8A%EB%0D%5D%E2%20%22%E5
2016-07-21 14:52:49 -04:00

24 lines
736 B
HTML

<html class="reftest-wait">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body onload="start()">
<textarea rows="3" onfocus="done()" spellcheck="false" style="-moz-appearance: none">אב
ג</textarea>
<script>
var textarea = document.querySelector("textarea");
function start() {
textarea.selectionStart = 0;
textarea.selectionEnd = 0;
textarea.focus();
}
function done() {
synthesizeKey("VK_LEFT", {});
synthesizeKey("VK_LEFT", {});
document.documentElement.removeAttribute("class");
}
</script>
</body>
</html>