4 <p>On most platforms, if you click and move the mouse on selected text, it will always initiate a drag. On Mac, there must be a delay between the click and the mouse move before a drag starts. Otherwise, it will just change the selection.
</p>
5 <p>To manually test, select
"hello" and rapidly drag. You should see
"hello world" on Mac and
"worldhello" on all other platforms.
</p>
7 <input id=
"text" type=
"text" value=
"hello world" />
9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
12 var text
= document
.getElementById("text");
13 text
.setSelectionRange(0, 5);
15 var start_x
= text
.offsetLeft
+ 5;
16 var start_y
= text
.offsetTop
+ text
.offsetHeight
/ 2;
17 eventSender
.mouseMoveTo(start_x
, start_y
);
18 eventSender
.mouseDown();
20 var end_x
= text
.offsetLeft
+ text
.offsetWidth
- 5;
22 eventSender
.mouseMoveTo(end_x
, end_y
);
23 eventSender
.mouseUp();
25 document
.getElementById('log').innerText
= text
.value
;