<?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>174259</bug_id>
          
          <creation_ts>2017-07-07 10:07:32 -0700</creation_ts>
          <short_desc>dataTransfer.getData(&quot;text/uri-list&quot;) for image on page returns nothing</short_desc>
          <delta_ts>2017-07-10 07:07:41 -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>Safari 10</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>170637</dup_id>
          
          <bug_file_loc></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 name="Zarema">zarema.khalilova</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>cdumez</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1326509</commentid>
    <comment_count>0</comment_count>
    <who name="Zarema">zarema.khalilova</who>
    <bug_when>2017-07-07 10:07:32 -0700</bug_when>
    <thetext>On one page there is a block and an image (an `img` element). On the block there is an `ondrop` event handler. 

```
function drop(dropevent) {
    dropevent.preventDefault();
    var data = dropevent.dataTransfer.getData(&quot;text/uri-list&quot;);
    dropevent.target.innerText = data
}
```

In Safari 10.1, if you drag an image into this block, the `dataTransfer.getData(&quot;text/uri-list&quot;)` method returns nothing. In other browsers and previous version of Safari, this method returns the url of the image.

Demo on codepen: https://codepen.io/zmoki/pen/mwjgLG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326712</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2017-07-07 17:10:08 -0700</bug_when>
    <thetext>We have this internally as &lt;rdar://problem/31347248&gt;

Does this affect any websites that you know of?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326713</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2017-07-07 17:12:10 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 170637 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326958</commentid>
    <comment_count>3</comment_count>
    <who name="Zarema">zarema.khalilova</who>
    <bug_when>2017-07-10 03:05:33 -0700</bug_when>
    <thetext>Yes, this affects Uploadcare Widget (file picker, https://uploadcare.com/documentation/widget/). You can see it on the pages https://uploadcare.com/ and https://uploadcare.com/quick_start/. On these pages there is demo where you need to drag image onto the button.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326987</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2017-07-10 07:07:41 -0700</bug_when>
    <thetext>(In reply to Zarema from comment #3)
&gt; Yes, this affects Uploadcare Widget (file picker,
&gt; https://uploadcare.com/documentation/widget/). You can see it on the pages
&gt; https://uploadcare.com/ and https://uploadcare.com/quick_start/. On these
&gt; pages there is demo where you need to drag image onto the button.

I meant deployed sites in practice, but please feel free to keep commenting in the original bug (170637)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>