<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>67025</bug_id>
          
          <creation_ts>2011-08-26 02:11:33 -0700</creation_ts>
          <short_desc>HTML5 Drag and Drop does not allow custom types</short_desc>
          <delta_ts>2017-09-27 21:45:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>172526</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=172526</see_also>
          <bug_file_loc>http://jsfiddle.net/pimvdb/HU6Mk/10/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>pimvdb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>natevw</cc>
    
    <cc>rniwa</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>457475</commentid>
    <comment_count>0</comment_count>
    <who name="">pimvdb</who>
    <bug_when>2011-08-26 02:11:33 -0700</bug_when>
    <thetext>e.dataTransfer.setData(&quot;text/plain&quot;, &quot;test&quot;);

allows one to fetch the data using

e.dataTransfer.getData(&quot;text/plain&quot;);

---

On the other hand, using a custom type like

e.dataTransfer.setData(&quot;custom&quot;, &quot;test&quot;);

does *not* allow one to fetch the data using

e.dataTransfer.getData(&quot;custom&quot;);

---

This is not as it should according to the specs:

http://dev.w3.org/html5/spec/Overview.html#the-drag-data-item-type-string

&quot;The API does not enforce the use of MIME types; other values can be used as well.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457476</commentid>
    <comment_count>1</comment_count>
      <attachid>105334</attachid>
    <who name="">pimvdb</who>
    <bug_when>2011-08-26 02:13:19 -0700</bug_when>
    <thetext>Created attachment 105334
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457477</commentid>
    <comment_count>2</comment_count>
      <attachid>105334</attachid>
    <who name="">pimvdb</who>
    <bug_when>2011-08-26 02:14:54 -0700</bug_when>
    <thetext>Comment on attachment 105334
Test case

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

Now drag the second &apos;drag me&apos; into the second &apos;drop me&apos; and watch the console log. It says undefined which is not correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>557679</commentid>
    <comment_count>3</comment_count>
    <who name="Nathan Vander Wilt">natevw</who>
    <bug_when>2012-02-15 15:58:13 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1354026</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-09-27 21:45:25 -0700</bug_when>
    <thetext>The feature has been implemented in https://trac.webkit.org/changeset/222595.

*** This bug has been marked as a duplicate of bug 172526 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>105334</attachid>
            <date>2011-08-26 02:13:19 -0700</date>
            <delta_ts>2011-08-26 02:14:54 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>ddissue.html</filename>
            <type>text/html</type>
            <size>1642</size>
            <attacher>pimvdb</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCiAgICA8aGVhZD4NCiAgICAgICAgPHRpdGxlPkRyYWcg
YW5kIERyb3AgaXNzdWU8L3RpdGxlPg0KDQogICAgICAgIDxzY3JpcHQgdHlwZT0idGV4dC9qYXZh
c2NyaXB0Ij4NCiAgICAgICAgZnVuY3Rpb24gcGQoZSkgeyBlLnByZXZlbnREZWZhdWx0KCk7IH0N
Cg0KICAgICAgICB3aW5kb3cub25sb2FkID0gZnVuY3Rpb24oKSB7DQogICAgICAgIA0KICAgICAg
ICAgICAgdmFyIGRyYWcgID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2RyYWcnKSwNCiAgICAg
ICAgICAgICAgICBkcm9wICA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdkcm9wJyksDQogICAg
ICAgICAgICAgICAgZHJhZzIgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZHJhZzInKSwNCiAg
ICAgICAgICAgICAgICBkcm9wMiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdkcm9wMicpOw0K
DQogICAgICAgICAgICAvLy8vLy8vLy8vDQoNCiAgICAgICAgICAgIGRyb3AuYWRkRXZlbnRMaXN0
ZW5lcignZHJhZ292ZXInLCBwZCk7DQoNCiAgICAgICAgICAgIGRyb3AuYWRkRXZlbnRMaXN0ZW5l
cignZHJvcCcsIGZ1bmN0aW9uKGUpIHsNCiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlLmRh
dGFUcmFuc2Zlci5nZXREYXRhKCJ0ZXh0L3BsYWluIikpOw0KICAgICAgICAgICAgfSk7DQoNCiAg
ICAgICAgICAgIGRyYWcuYWRkRXZlbnRMaXN0ZW5lcignZHJhZ3N0YXJ0JywgZnVuY3Rpb24oZSkg
ew0KICAgICAgICAgICAgICAgIGUuZGF0YVRyYW5zZmVyLmVmZmVjdEFsbG93ZWQgPSAiY29weSI7
DQogICAgICAgIC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m9keT4NCjwvaHRtbD4NCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>