Setting `text/html` via 'dataTransfer.setData' results in invalid data format in clipboard

Fixed Issue #14372529


Krzysztof K.
Oct 25, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 7 people

Sign in to watch or report this issue.

Steps to reproduce

When HTML is copied with e.g. CTRL + C the data put inside clipboard contains special HTML format which is easily recognized by other applications (e.g. browsers), like:

<html><body><!--StartFragment-->Copied HTML...<!--EndFragment--></body></html>

However, when clipboard data is set manually on copy, the clipboard data contains only set value without HTML specific wrapper:


  1. Go to
  2. Copy HTML or its part from the div.

Clipboard contains <p>this paragraph contains <strong>some text</strong></p> HTML string wrapped in HTML specific wrapper.

Clipboard contains only <p>this paragraph contains <strong>some text</strong></p> HTML string.

This behaviour is quite painful as such HTML clipboard data is not properly recognized by other browsers (Chrome/FF) so it cannot be pasted there.


2 attachments

Comments and activity

  • Works in Chrome and FF where manually set text/html data is properly wrapped.

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • Hello,

    Thank you for providing this information about the issue. After thorough testing, we are unable to reproduce this problem in Edge with the information at hand. We find Edge and Firefox copy the expected content, but Chrome drops the paragraph tags (<p>). Screenshots attached.

    Please update this case when you can provide more details, such as screenshots or video capture of your repro to ensure we are following the correct steps.

    Best Wishes,
    The MS Edge Team

  • I uploaded the video showing how the behaviour differs for regular copy/paste and copy/paste with manually set text/html in Edge and Chrome (00:00 to 01:10).
    The second part (01:11 to 01:59) shows that it is not possible to paste content set manually in Edge to Chrome (while regular copy/paste works fine).

  • Uploaded the file to dropbox as it was too large to be put here:

  • Microsoft Edge Team

    Changed Status to “Fixed”

  • Hello,

    Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 17017 and is available in our latest Insider Preview build in the Fast ring.

    Best Wishes,
    The MS Edge Team

  • Thanks James, glad to hear that!

    Could you tell me when the Edge 17017 preview will be more widely available (e.g. on so I can verify the fix?

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

Sign in