Drag and drop does not allow custom mime types

Fixed Issue #8007622


Chris M.
Jun 27, 2016
This issue is public.
Found in
  • Microsoft Edge
Standard affected
HTML: 5. User interaction

Found in build #
Reported by 20 people

Sign in to watch or report this issue.

Steps to reproduce

URL: http://codepen.io/anon/pen/ZOdwAZ


Slightly DIfferent Version: http://jsbin.com/cakemezufi/1/edit?html,output 



  1. Make an element draggable
  2. In the element’s dragstart listener, call event.dataTransfer.setData('text/x-custom', 'custom-text');
  3. The error “SCRIPT1168: Element not found.” is logged to the console, and the data transfer is not populated.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

    • We noticed that this does repro, but, it also does the same thing in Chrome - just with a different error message.  Could you provide some sample code that demonstrates this problem for us, please? We would love to investigate further but need an exact example.

      All the best,
      The MS Edge Team

    • from https://html.spec.whatwg.org/multipage/interaction.html#the-drag-data-item-type-string :

      “The API does not enforce the use of MIME types; other values can be used as well.”

      also, language similar to this exists in all versions of the spec going back at least to 2010.

      IE is clearly bugged here.

      here’s a repro: http://codepen.io/anon/pen/ZOdwAZ, as if one were necessary.

      dragging the div should result in an alert popup saying 'bar’. this works in Chrome and Firefox.

    • Microsoft Edge Team

      Changed Assigned To to “Travis L.”

      Changed Assigned To to “Sermet I.”

      Changed Steps to Reproduce

      Changed Assigned To from “Sermet I.” to “Bruce L.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Bruce L.” to “Ted D.”

      Changed Status from “Confirmed” to “By design”

    • Thank you for the feedback on Edge. This is a feature request that we are tracking with another internal deliverable. We hope to have this feature ready to go in a future release.

      All the best,
      The MS Edge Team

    • Hello Edge team,

      In my opinion, this bug should be fixed as soon as possible. Here, at Kapsch trafficom, we’re developing non-trivial drag and drop solutions in our apps and this is a basic drag and drop feature for us.

      Please, add custom draggable mime types in your drag and drop system.

    • Are there any plans for fixing this issue in the near future? It still exists in Edge 16 (preview). All other modern browsers (Chrome, Firefox, Safari) already supports custom mime types in setData for some time now. It really makes implementing decent rich drag and drop and copy/paste support complicated.

    • Just adding that Edge is the only modern browser that does not support this. It prevents proper drag and drop support where you may have different formats being dropped.

    • Hi Edge Team,
      is there any update on this topic? I use custom type to identify the type of drag and drop that is done by the user so I can use the type into the dragover element to add extra information on the display. Is there other way to implement this?
      Thanks in advance for your response.

    • Brad, I can confirm that this bug does not repro in Chrome, it’s Edge only.

    • Why is this issue marked as 'By Design’? The standard allows for any text value and as such should allow for any value.
      Like Laurent L. my application uses the type field to identify different objects and tell them apart from externally dragged in objects such as files or plain text.

    • Hi @Nidonocu P.,
      I finally found a workaround for this.
      I use the localStorage to set the type of dragged data.
      on dragEnd I remove the entry in the storage.
      It’s not worse that putting the information in localStorage than in customized type of a drag and drop.
      We don’t use drag and drop outside of a browser context so it works. Not sure that we can have custom data type datatransfer of a drag and drop issued from a desktop app.

      Laurent L.

    • Would someone on the Edge team mind explaining the reason behind this being closed as By Design?

    • Microsoft Edge Team

      Changed Status from “By design” to “Fixed”

    • Adding a public link to a more recent submission related to this issue:


      This issue is fixed in 17134.48 or more recent.  Did not verify the earliest release this fix was made public.

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

    Sign in