[Webkit-unassigned] [Bug 58206] [Qt] HTML5 drag and drop not working when getData is used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 22 17:15:15 PDT 2011


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


Rhema <rhemalinder at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rhemalinder at gmail.com




--- Comment #8 from Rhema <rhemalinder at gmail.com>  2011-10-22 17:15:14 PST ---
This is a huge problem for me (see http://stackoverflow.com/questions/7830249/how-do-you-get-the-selected-items-from-a-dragstart-event-in-chrome-is-datatrans) this solution makes perfect sense.  For example, a dragstart should have the data being dragged available if the event is registered on that document.
E.G.  Add this to the Chrome Javascript dev console...
window.addEventListener("dragstart", function(event) {
        alert(event.dataTransfer.getData("Text"));
    });

Returns alerts 'undefined' when selected text is dragged. :(

  (In reply to comment #7)
> This is broken on all the ports because, we dont allow getData to be called when drag start or drag over is happening. This is for security reason, that getData can be accessed only during drop event and not before that. This so, because when you are dragging data across documents on your desktop, you do not want getData to be called by intermittent document which is not suppose to have access to data. The real solution to this problem would be to check if the dragging is happening within the same document (if within same domain), then getData can be accessed in drag enter and drag over event too. This is the implementation in other browsers like firefox.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list