[Webkit-unassigned] [Bug 178010] New: on Safari 10.12.6 event.dataTransfer.getData('URL') always returns empty

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 6 08:18:15 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=178010

            Bug ID: 178010
           Summary: on Safari 10.12.6 event.dataTransfer.getData('URL')
                    always returns empty
           Product: WebKit
           Version: Safari 10
          Hardware: Macintosh
                OS: macOS 10.12
            Status: NEW
          Severity: Major
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mac.iphone.dev at gmail.com

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171006/7a0e1bae/attachment.html>


More information about the webkit-unassigned mailing list