6 if (window
.testRunner
) {
7 testRunner
.waitUntilDone();
8 setTimeout(autoscrollTestPart1
, 0);
11 function autoscrollTestPart1()
13 var ta
= document
.getElementById('ta');
14 if (window
.eventSender
) {
16 var h
= ta
.offsetTop
- document
.scrollingElement
.scrollTop
+ 10;
17 eventSender
.dragMode
= false;
18 eventSender
.mouseMoveTo(20, h
);
19 eventSender
.mouseDown();
20 eventSender
.mouseMoveTo(20, h
);
21 eventSender
.mouseMoveTo(100, h
);
23 setTimeout(autoscrollTestPart2
, 100);
25 function autoscrollTestPart2()
27 if (window
.eventSender
)
28 eventSender
.mouseUp();
29 if (window
.testRunner
)
30 testRunner
.notifyDone();
34 var res
= document
.getElementById('res');
35 res
.innerHTML
= res
.innerHTML
+ msg
+ "<br>";
39 <body onload=
"test()">
40 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=12331">bug
12331</a>.
</p>
41 <p>To test manually, scroll down until you find the input element. Select some text. If the bug occurs, the page will scroll back up to the top.
</p>
42 <div style=
"height:3000px"></div>
43 <input id=
"ta" value=
"select some of this text"></input>
44 <p>If the bug does not occur, you'll be left down here at the bottom.
</p>