blob: f80ec90bdf6c594b08843eb8cd4d10e8ae85e4e3 [file] [log] [blame]
<html>
<head>
<script>
function test() {
if (window.testRunner)
testRunner.dumpAsText();
var ta = document.getElementById('ta');
// Send caret to bottom of textarea
ta.focus();
ta.setSelectionRange(ta.value.length, ta.value.length);
ta.blur();
ta.focus();
ta.blur();
if (ta.scrollTop != 0)
document.getElementById('res').innerHTML = "Test Passed";
}
</script>
</head>
<body onload="test()">
This tests that we don't scroll back to the top when leaving a textarea
<br>
<textarea id="ta">
1
2
3
4
5
</textarea>
<div id="res">Test Failed</div>
</body>
</html>