Bug 174259
Summary: | dataTransfer.getData("text/uri-list") for image on page returns nothing | ||
---|---|---|---|
Product: | WebKit | Reporter: | Zarema <zarema.khalilova> |
Component: | New Bugs | Assignee: | 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 |
Zarema
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brady Eidson
We have this internally as <rdar://problem/31347248>
Does this affect any websites that you know of?
Brady Eidson
*** This bug has been marked as a duplicate of bug 170637 ***
Zarema
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.
Brady Eidson
(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)