5 This test passes if middle mouse clicking on a link where the event handler
6 focuses a textarea does not paste into the textarea.
8 <a href=
"link" id=
"link">Link
</a>
9 <textarea id=
"textarea">Content
</textarea>
10 <script src=
"../../resources/dump-as-markup.js"></script>
13 Markup
.description(document
.getElementById('description').textContent
);
15 document
.body
.focus();
16 document
.execCommand('SelectAll', false, null);
17 document
.execCommand('Copy', false, null);
19 var textarea
= document
.getElementById('textarea');
20 var linkElement
= document
.getElementById('link');
22 linkElement
.addEventListener("click", function(e
) {
27 var linkX
= linkElement
.offsetLeft
+ linkElement
.offsetWidth
/ 2;
28 var linkY
= linkElement
.offsetTop
+ linkElement
.offsetHeight
/ 2;
30 eventSender
.mouseMoveTo(linkX
, linkY
);
31 eventSender
.mouseDown(1);
32 eventSender
.mouseUp(1);
34 Markup
.dump(textarea
, 'After middle click on link');