<body> | |
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13690">bug 13960</a>: | |
JavaScript Form Validation issue on Banco do Brasil site.</p> | |
<form> | |
<input type="text"> | |
</form> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
input = document.getElementsByTagName("input")[0]; | |
input.value = "1"; | |
document.write(input.selectionStart == 1 ? "1. SUCCESS" : "1. FAILURE (the insertion point should be at the end)"); | |
document.write("<br>"); | |
input.focus(); | |
input.value = "12"; | |
document.write(input.selectionStart == 2 ? "2. SUCCESS" : "2. FAILURE (the insertion point should be at the end)"); | |
</script> | |
</body> |