`event.clipboardData.getData()` does not reflect successful `setData()` call

Confirmed Issue #14110451 • Assigned to Amit J.


Lucas G.
Oct 6, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 9 people

Sign in to watch or report this issue.

Steps to reproduce

Consider the following script:

  document.addEventListener("copy", function(e) {
    e.clipboardData.setData("text/plain", "plain text");
  function f() {
<button onclick="f()">Button</button>

The setData() call succeeds, because the string “plain text” actually ends up on the clipboard. However, it is not possible to confirm this, because the getData() call returns an empty string.

Chrome, Safari, and Firefox correctly return the value that setData() sets on e.clipboardData:


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “travil”

      Changed Assigned To from “travil” to “Travis L.”

      Changed Assigned To to “Grisha L.”

      Changed Status to “Confirmed”

    • We have observed the same behaviour when working on Clipboard API integration in CKEditor 4. It is not possible to access the data set in dataTransfer in the same listener in which it was set and as mentioned, empty string is always returned.

      The problem occurs for all accepted MIME types (text/plain, text/html, etc).

      Are there any plans for the fix in the nearest future?

    • The issue is also reproducible in newest Edge version (16.16257).

    • Microsoft Edge Team

      Changed Assigned To from “Grisha L.” to “Amit J.”

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

    Sign in