summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/text/input-text-scroll-left-on-blur.html
blob: 6abfeb1cc636a84c2dc666f6bf5f359eabc9e7ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<input id="a" type="text" value="this text field has a lot of text in it so that it needs to scrol">
<input id="b" type="text" style="direction: rtl" value="this text field has a lot of text in it so that it needs to scrol">
<input id="c" type="text" value="this text field has a lot of text in it so that it needs to scrol">
<p>Tests scrolling back to the beginning when a text field blurs. The first field should be scrolled to the left, the second and third scrolled to the right.</p>
<script>
var a = document.getElementById("a");
a.focus();
a.setSelectionRange(66, 66);
if (window.eventSender) {
    eventSender.keyDown("l");
}
var b = document.getElementById("b");
b.focus();
b.setSelectionRange(66, 66);
if (window.eventSender) {
    eventSender.keyDown("l");
}
var c = document.getElementById("c");
c.focus();
c.setSelectionRange(66, 66);
if (window.eventSender) {
    eventSender.keyDown("l");
}
</script>