Edge/IE11 doesn't contain information about copied image into clipboard

Won’t fix Issue #15823907

Details

Author
Jacek
Created
Feb 6, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
  • Safari
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

IE11 and Edge are not supporting copying and pasting files from clipboardData - an object is not populated with files from a clipboard.

  1. Visit this codepen
  2. Copy an image from file system to clipboard.
  3. Check Images count value.

Expected

Images count: 1

Actual

For IE11: nothing - when you pasting image from clipboard using IE11 paste event is not even called.
For Edge: Images count: 0

Attachments

1 attachment

Comments and activity

  • Between steps 2 and 3 should be - Paste image from clipboard to contenteditable field.

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Jacek,

    Thank you for the update.  I was just looking at that.  I noticed that the repro will accept the image no matter where it is pasted but will not display it unless the content editable div is selected.

    One item I noticed already is that the using a “blocked” image will give the results you are seeing.  When I “unblock” the downloaded image (right click image and select unblock), that the count does change to 1, however, the image is not displayed even if the content editable div is selected.

    I also notice that it appears the issue here is related to script security.  I will look into this a bit more and let you know.

    Appreciate the fun submission.  :-)

    Steve

  • Correction.  The file being blocked or not does not make a difference,  I confused using an online image versus an image on my local machine as mentioned in your repro steps.

    I am going to create a non-iframe version of this repro due to the iframe security warnings I am seeing in Edge.  The iframe is from codepen.io’s framework.

    Steve

  • Will you provide the extended version of Windows 10 you are using?  Win + S and type “winver” and hit enter.

  • I am not able to reproduce this issue.  I tested in 16299.192 and a current developer release.  I believe this issue may have been corrected in release after the one you are using?

  • Microsoft Edge Team

    Changed Status to “Fixed”

  • Changed Status from “Fixed”

  • Hello,
    thank you for your fast response.

    I’m using Windows 10 OS Build: 16299.192 and it doesn’t matter if I’m using codepen with iframe or simple .txt file. I can still reproduce the issue.

    You can just save this html to plain text file with .html extension and open it with Edge:

    
    
    
        
        
        
    
        
    
    
    
    
    
    Images count:
    
    
    
    
    
    
    
    

    When I’m pasting image from file explorer (not online) I’m getting Images count: 0 result. And as you can see in the javascript code it should be 1 if DataTransfer object would be supported. I don’t have this issue on different browsers like Firefox (Windows, Unix) or Chrome (only Unix).

  • Looks like it’s something wrong with MD processing. I’m pasting html content without MD, I believe you are escaping HTML :)

    Images count:

  • Still it’s parsed in some way, but you could just create html file from codepen example.

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • Hello,

    Thank you for providing this information about the issue.

    The reason you are seeing “Images count: 0” is because any image copied from File Explorer and pasted into your contentEditable Div has items.length == 0 (but an image copied in the browser has items.length == 2). This causes the entire for
    loop to be skipped, so the var count
    remains 0 as defined earlier in the code.

    This might not be an Edge issue, as I am seeing the same behavior in Chrome and Firefox on Windows OS. This might be a Windows issue.

    I will run tests on different OS’s and see what happens. Meanwhile, do let me know if you have any new insights on the problem.

    Best Wishes,
    The MS Edge Team

  • As I checked it works fine with Firefox on Windows. For OSX Chrome, Firefox and Safari ( (since Safari Tech Preview) it’s working as expected.

  • Microsoft Edge Team

    Changed Status to “Confirmed”

    Changed Status from “Confirmed” to “By design”

  • @James M. / @Grisha L. I’m afraid you have missed the point of this feature request.

    While copying file from the File Explorer you’re putting in a clipboard a file representation, not an actual image.

    (…) (but an image copied in the browser has items.length == 2) (…)

    Yes - because it puts a raw image into the clipboard, which is different from file (which might or might not be an image, and does not store directly image blob as far as I’m concerned, though I might be wrong about that).

    What is smart about what Firefox is doing is (my assumption) that they are checking file (FileNameW field in the clipboard) in the clipboard whether it’s an embeddable type or not. Image is embeddable, so they use a strategy to convert it into an image, just as an image would be copied.

    Please, have a second this issue, thanks!

  • Microsoft Edge Team

    Changed Assigned To to “Grisha L.”

    Changed Status from “By design”

    Changed Status to “Won’t fix”

  • thank you, Marek
    I think, I understand repro steps now.
    Unless it is part of the standard or is supported by another major browser on Windows, Chrome for example, we are going to won’t fix this request.  

    If this is something that truly blocks you, I would recommend open a GitHub issue on Clipboard spec so we can discuss it there. If people would agree on the proposal, we can then update the spec and implement it for the rest of the browsers. Does this sound ok?

    Here is the link to the issues on GitHub: https://github.com/w3c/clipboard-apis/issues 

  • OK I see your point. Just keep in mind that this is already supported by one major brwoser (Firefox).

You need to sign in to your Microsoft account to add a comment.

Sign in