<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>3582</bug_id>
          
          <creation_ts>2005-06-16 19:36:39 -0700</creation_ts>
          <short_desc>onDrop ignored in &lt;textarea&gt;</short_desc>
          <delta_ts>2010-01-11 21:46:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jakub Nesetril">jakub.nesetril</reporter>
          <assigned_to name="Adele Peterson">adele</assigned_to>
          <cc>ap</cc>
    
    <cc>dbates</cc>
    
    <cc>glan</cc>
    
    <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12315</commentid>
    <comment_count>0</comment_count>
    <who name="Jakub Nesetril">jakub.nesetril</who>
    <bug_when>2005-06-16 19:36:39 -0700</bug_when>
    <thetext>By default, you can drag text (or even files) onto textarea, however, this action does not trigger the 
onDrop event.

Steps to reproduce:
* select arbitrary text
* drop onto the textarea

Expected results:
* logging the action via the scripted ondrop event

Assigned to Darin Adler for similarities to bug#3256
http://bugzilla.opendarwin.org/show_bug.cgi?id=3256</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12316</commentid>
    <comment_count>1</comment_count>
      <attachid>2413</attachid>
    <who name="Jakub Nesetril">jakub.nesetril</who>
    <bug_when>2005-06-16 19:38:42 -0700</bug_when>
    <thetext>Created attachment 2413
Testcase - drop text onto the textarea</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15952</commentid>
    <comment_count>2</comment_count>
    <who name="mikepk">mike_pk</who>
    <bug_when>2007-04-02 13:54:28 -0700</bug_when>
    <thetext>I would add that it&apos;s not just onDrop, but any drag event (ondragover, ondragenter, ondragleave). Strangely only the border of the textarea (the 1 pixel line around the textarea) seems to fire these events but the body of the textarea does not.

Also positioning elements above a textarea (absolutely positioned) causes events not to fire on that element either (seems as if the textarea below the elements is intercepting and sinking the events). Dropping text on a div, absolutely positioned above a textarea causes the text to appear in the textarea (instead of being handled by the upper element).
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120075</commentid>
    <comment_count>3</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-05-06 00:10:14 -0700</bug_when>
    <thetext>drop also seems to never fire for contentEditable regions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166965</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-11-27 15:27:37 -0800</bug_when>
    <thetext>The test case (&lt;https://bugs.webkit.org/attachment.cgi?id=2413&gt;) is invalid, because it does not listen for the dragenter and dragover events as required by section 7.9.1 of the HTML 5 spec, &lt;http://dev.w3.org/html5/spec/Overview.html#introduction-4&gt;. In particular, the spec. states,  &quot;to accept a drop, the drop target has to listen to at least three events: [dragenter, dragover, and drop]&quot;.

When the above prerequisite is satisfied, we do not ignore ondrop events to textareas. Moreover, dragenter, dragover, and drop events are all delivered to the textarea.

Actually, we fire the ondrop event so long as the textarea is listening for dragover events. We should probably file a separate bug to make dragenter also required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166966</commentid>
    <comment_count>5</comment_count>
      <attachid>43973</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-11-27 15:30:29 -0800</bug_when>
    <thetext>Created attachment 43973
Working example

In this example, the textarea listens for dragenter, dragover, and drop events. When you successfully drop the text (in whole or in part) on the textarea, a JavaScript alert will be shown, &quot;Caught drop.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179673</commentid>
    <comment_count>6</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-01-11 21:46:58 -0800</bug_when>
    <thetext>Dan&apos;s analysis makes sense to me.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2413</attachid>
            <date>2005-06-16 19:38:42 -0700</date>
            <delta_ts>2005-06-16 19:38:42 -0700</delta_ts>
            <desc>Testcase - drop text onto the textarea</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>451</size>
            <attacher name="Jakub Nesetril">jakub.nesetril</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KPGh0bWw+CjxoZWFkPgoJ
PHRpdGxlPm9uZHJvcCB0ZXN0PC90aXRsZT4KPC9oZWFkPgo8Ym9keT4KCjxzY3JpcHQ+CmZ1bmN0
aW9uIGxvZyhtZXNzYWdlKQp7CiAgICB2YXIgaXRlbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQo
ImxpIik7CiAgICBpdGVtLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKG1lc3Nh
Z2UpKTsKICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJjb25zb2xlIikuYXBwZW5kQ2hpbGQo
aXRlbSk7Cn0KPC9zY3JpcHQ+Cgo8dGV4dGFyZWEgb25kcm9wPSJsb2coJ3RleHRhcmVhJyk7Ij48
L3RleHRhcmVhPgo8b2wgaWQ9ImNvbnNvbGUiPjwvb2w+CgoKPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>43973</attachid>
            <date>2009-11-27 15:30:29 -0800</date>
            <delta_ts>2009-11-27 15:30:29 -0800</delta_ts>
            <desc>Working example</desc>
            <filename>sample1.html</filename>
            <type>text/html</type>
            <size>474</size>
            <attacher name="Daniel Bates">dbates</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c2NyaXB0Pgp3aW5kb3cub25sb2FkID0gZnVuY3Rpb24oKQp7CiAgICB2
YXIgdGV4dGFyZWEgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgidGV4dGFyZWEiKTsKICAgIHRl
eHRhcmVhLm9uZHJhZ2VudGVyID0gZnVuY3Rpb24oZSkgewogICAgICAgIGUucHJldmVudERlZmF1
bHQoKTsKICAgIH07CiAgICB0ZXh0YXJlYS5vbmRyYWdvdmVyID0gZnVuY3Rpb24oZSkgewogICAg
ICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgIH07CiAgICB0ZXh0YXJlYS5vbmRyb3AgPSBmdW5j
dGlvbihlKSB7CiAgICAgICAgYWxlcnQoJ0NhdWdodCBkcm9wLicpOwogICAgICAgIGUucHJldmVu
dERlZmF1bHQoKTsKICAgIH07Cn0KPC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+Cjx0ZXh0YXJlYSBp
ZD0idGV4dGFyZWEiPjwvdGV4dGFyZWE+CjxwPkRyb3AgbWUgb250byB0aGUgdGV4dCBhcmVhLjwv
cD4KPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>