Bug 174259

Summary: dataTransfer.getData("text/uri-list") for image on page returns nothing
Product: WebKit Reporter: Zarema <zarema.khalilova>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: beidson, cdumez, simon.fraser, wenson_hsieh
Priority: P2    
Version: Safari 10   
Hardware: Mac   
OS: macOS 10.12   

Description Zarema 2017-07-07 10:07:32 PDT
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("text/uri-list");
    dropevent.target.innerText = data
}
```

In Safari 10.1, if you drag an image into this block, the `dataTransfer.getData("text/uri-list")` 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
Comment 1 Brady Eidson 2017-07-07 17:10:08 PDT
We have this internally as <rdar://problem/31347248>

Does this affect any websites that you know of?
Comment 2 Brady Eidson 2017-07-07 17:12:10 PDT

*** This bug has been marked as a duplicate of bug 170637 ***
Comment 3 Zarema 2017-07-10 03:05:33 PDT
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.
Comment 4 Brady Eidson 2017-07-10 07:07:41 PDT
(In reply to Zarema from comment #3)
> 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.

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