clipboardData should be a member of the event and not of window - by Alfonso ML

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

ID 795769 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 8/1/2013 1:55:48 PM
Access Restriction Public


You might close this as "by design", but the fact is that if you really want IE11 to be treated like other browsers and that existing code works out of the box you should adjust it.

Both Firefox and Chrome expose clipboardData as a property of the paste event, and any new code that tries to access the files property will use that object instead of looking at the window object.

So now any script that tries to help people to paste and upload the content of the clipboard will do nothing in IE11 (just like if you didn't add anything) because you're not using the object that they expect.
Sign in to post a comment.
Posted by Microsoft on 4/4/2016 at 9:04 AM
We've moved! This issue is now being tracked at
Posted by Alfonso ML on 8/19/2013 at 1:19 PM
This ticket was created because this was the first issue that I found thile testing my file upload plugin with IE11:

Fortunately I was able to find out this issue and allow pasting images from the clipboard (but not as fully featured as Firefox), so that basic feature will be possible when I release a new version (and people upgrade their pages). If you just added the requested feature the plugin would have worked out of the box. And I bet that my plugin isn't the only one that was designed and tested with Firefox and Chrome, so those users that try IE11 will find that this new browser doesn't work as advertised.

Also, due to the changes to break previous detection of IE and keeping other IE unique behaviors drag&drop no longer worked until I added specific code to recognize IE11 as the new IE, so again, this could be a behavior that if changed would improve the compatibility of IE11 with other browsers and existing pages, but I guess that nobody will mind to wait another year for IE12 when you review this decision.

Thanks, we'll meet next year for IE12.

Posted by Microsoft on 8/19/2013 at 11:30 AM
Alfonso, thank you for the suggestion. This is something that we will be considering for a future release. Today there isn't good interoperability between Firefox and Chrome and IE11 because different browsers have implemented different parts of the clipboard specification. For example, Chrome supports the files collection when pasting a single image from the clipboard but not multiple images from an application like Word. IE11 does support this scenario. Firefox pastes as a dataURI by default and Chrome does not support this without JavaScript code to read the file.

We carefully considered adding the clipboard data to the event object but we do not believe that this will improve interoperability at this time. We decided, then, that for this release we will leave the object where it always has been in IE until we can see how all the browsers can better converge on an interoperable API surface. We will continue to track this issue for a future release.

Best regards,

The Internet Explorer Team
Posted by Microsoft on 8/15/2013 at 12:26 PM
Hello Alfonso

Thank you for the very detailed information. We are able to reproduce the issue as you have described and this issue is under additional investigation. We will follow up with you as soon as more information is available.
Best regards,

The Internet Explorer Team
Posted by Alfonso ML on 8/2/2013 at 2:54 AM
I've uploaded the demo to and I still can reproduce it again today. Nothing has changed in these hours.

I'm testing with the win8.1 preview virtual machine under VMWare Player in Windows 7. If this has been fixed in a later internal build, then that's great, but you should tell so instead of saying that this can't be reproduced.

Steps to reproduce:
1. Open an image in windows Paint, Select all and Copy it to the Clipboard.
2. Open
3. Put the focus on the editable zone, where it tells you so. Press ctrl+V
4. In Firefox and IE11 the image is pasted as base64 encoded, but this ticket is not about that, it's about the ability to detect that file before it's being pasted.
5. A log will appear below that zone with the data detected while pasting.
In Firefox and Chrome it will output

event.clipboardData: object
event.clipboardData.files: object
window.clipboardData: undefined

In IE11 it will output:

event.clipboardData: undefined
window.clipboardData: object
window.clipboardData.files: object

Given that the ability to attach files during a paste event is something new to IE11 and previously it was only a feature of Firefox and Chrome:
Do you think that existing code will work out of the box or will it fail to look at your window.clipboardData ?

There are other issues regarding this new ability, but if you fail to recognize that this one should be adjusted, I don't see any reason to keep on testing with IE11. IE will always require specific IE code.
Posted by Microsoft on 8/1/2013 at 2:30 PM
Thank you for your feedback.

We are currently unable to reproduce this issue as described.

We value your feedback. If you have additional information that can help us recreate this issue — such as a specific url, more detailed steps, test results from different machines, or additional conditions — please reactivate the bug or submit a new bug with more details on how to reproduce the issue. You can also read the guidelines at regarding filing a good bug report.

Best regards,

The Internet Explorer Team