WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
178010
on Safari 10.12.6 event.dataTransfer.getData('URL') always returns empty
https://bugs.webkit.org/show_bug.cgi?id=178010
Summary
on Safari 10.12.6 event.dataTransfer.getData('URL') always returns empty
Leonardo
Reported
2017-10-06 08:18:15 PDT
macOS 10.12.6. On Safari 10.1.2 The javascript command dataTransfer.getData('URL') returns empty while other browsers properly return the image I drag from the same HTML page. The code: function handleDrop(e) { var imageUrl = e.dataTransfer.getData('URL'); console.log("handleDrop imageUrl: " + imageUrl); } The log is "handleDrop imageUrl:" It's empty. --------- Other browsers: Chrome Version 61.0.3163.100 (Official Build) (64-bit) I did run the same test and I properly got the image URL, as "handleDrop imageUrl:
http://localhost/images/icn_logo.png
" It works even if I drag the image from another page/window from another web site, as "handleDrop imageUrl:
https://upload.wikimedia.org/wikipedia/commons/c/ce/Madonna_In_Gothenburg.jpg
" I get the URL with several types as text/uri-list, Text, text/plain, URL --------- Important! If I drag the same image from the Safari web page/window onto a Chrome web page/window, it works. If I drag the same image from the Chrome web page/window onto a Safari web page/window, it doesn't work. So I suppose that the drag and drop on Safari properly stores the drag data but it can't read it from the dataTransfer object. Thank you
Attachments
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2017-10-08 14:01:39 PDT
This should be fixed with
http://trac.webkit.org/r221343
. Are you able to reproduce on a nightly build?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug