4 <script type=
"text/javascript">
5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.dumpEditingCallbacks();
10 function kill_event(event
)
12 event
.preventDefault();
21 eventSender
.mouseMoveTo(x2
, y
);
22 eventSender
.mouseUp();
24 var result
= document
.getElementById("result");
25 result
.innerText
= getSelection().baseNode
? "FAIL" : "PASS";
27 testRunner
.notifyDone();
32 if (!window
.eventSender
)
35 testRunner
.waitUntilDone();
37 var target
= document
.getElementById("target");
38 y
= target
.offsetTop
+ target
.offsetHeight
/ 2;
39 x1
= target
.offsetLeft
+ 10;
42 eventSender
.dragMode
= false;
43 eventSender
.mouseMoveTo(x1
, y
);
44 eventSender
.mouseDown();
45 // Get the autoscroll timer started
46 eventSender
.mouseMoveTo(x1
, y
);
48 // Wait the autoscroll timer interval
49 setTimeout(finish
, 100);
52 addEventListener("selectstart", kill_event
, true);
55 <body onload=
"test()">
57 Test for
<i><a href=
"http://bugs.webkit.org/show_bug.cgi?id=12823">http://bugs.webkit.org/show_bug.cgi?id=
12823</a>
58 REGRESSION(r16968-
16977): unable to prevent selection by cancelling
"selectstart" event
</i>.
61 You should not be able to select this text by clicking or dragging across it.