Bug 67025

Summary: HTML5 Drag and Drop does not allow custom types
Product: WebKit Reporter: pimvdb
Component: New BugsAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ap, natevw, rniwa, wenson_hsieh
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jsfiddle.net/pimvdb/HU6Mk/10/
See Also: https://bugs.webkit.org/show_bug.cgi?id=172526
Description Flags
Test case none

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 ***