title: HTML5 Drag and Drop getData() only works on drop event in Chrome?
body: <p>I'm currently working on a project at work using the HTML5 Drag and Drop API to provide added functionality including dragging items in and out of browsers. I am currently coming across issues which are specific to Chrome (otherwise only tested in Firefox, which works as expected).</p>
  <p>The issue is that I cannot use the <code>event.dataTransfer.getData(type)</code> method to return the data set on the <code>dragstart</code> event in any events except the <code>drop</code> event.</p>
  <p>I set the event like so, after binding to the <code>dragstart</code> event (which DOES fire):</p>
  <pre><code>event.dataTransfer.setData('text/plain', &quot;some string&quot;)
  </code></pre>
  <p>Then in the <code>drop</code> event, I can get the data fine.</p>
  <pre><code>event.dataTransfer.getData('text/plain')
  </code></pre>
  <p>However I cannot use the same method as above on any other events (such as <code>dragover</code>). Even if I try and use the above method on the line after calling <code>setData()</code> (i.e., in the <code>dragstart</code> callback), then it will still return <code>undefined</code>.</p>
  <p>So, in Chrome, the issue is that <code>getData</code> in Chrome will always return <code>undefined</code>, except within the <code>drop</code> event callback.  (In Firefox, I can successfully get the correct data.)</p>
  <p>If you have the reference to the <code>dataTransfer</code> object of the same dragging element, then why should you not be able to get the data until it is dropped?</p>
  <p>Just wondering:</p>
  <ul>
  <li>Has anyone had this trouble with Chrome before?</li>
  <li>What workarounds are there?</li>
  <li>Or, is it something Chrome needs to fix?</li>
  </ul>
  <p>Resources:
  <a href="http://dev.w3.org/html5/spec/Overview.html#dnd" rel="noreferrer">Specification for HTML5 drag and drop.</a></p>