Bug 67025 - HTML5 Drag and Drop does not allow custom types
Summary: HTML5 Drag and Drop does not allow custom types
Status: RESOLVED DUPLICATE of bug 172526
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/pimvdb/HU6Mk/10/
Depends on:
Reported: 2011-08-26 02:11 PDT by pimvdb
Modified: 2017-09-27 21:45 PDT (History)
4 users (show)

See Also:

Test case (1.60 KB, text/html)
2011-08-26 02:13 PDT, pimvdb
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pimvdb 2011-08-26 02:11:33 PDT
e.dataTransfer.setData("text/plain", "test");

allows one to fetch the data using



On the other hand, using a custom type like

e.dataTransfer.setData("custom", "test");

does *not* allow one to fetch the data using



This is not as it should according to the specs:


"The API does not enforce the use of MIME types; other values can be used as well."
Comment 1 pimvdb 2011-08-26 02:13:19 PDT
Created attachment 105334 [details]
Test case
Comment 2 pimvdb 2011-08-26 02:14:54 PDT
Comment on attachment 105334 [details]
Test case

Drag first 'drag me' into first 'drop me' and watch the console log. It says 'test' which is correct.

Now drag the second 'drag me' into the second 'drop me' and watch the console log. It says undefined which is not correct.
Comment 3 Nathan Vander Wilt 2012-02-15 15:58:13 PST
This may be just a Chrome-specific issue: http://code.google.com/p/chromium/issues/detail?id=93514

Custom data types are working fine for me in Safari, but rather unsupported in Chrome.
Comment 4 Ryosuke Niwa 2017-09-27 21:45:25 PDT
The feature has been implemented in https://trac.webkit.org/changeset/222595.

*** This bug has been marked as a duplicate of bug 172526 ***