WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
3582
onDrop ignored in <textarea>
https://bugs.webkit.org/show_bug.cgi?id=3582
Summary
onDrop ignored in <textarea>
Jakub Nesetril
Reported
2005-06-16 19:36:39 PDT
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
Attachments
Testcase - drop text onto the textarea
(451 bytes, text/html)
2005-06-16 19:38 PDT
,
Jakub Nesetril
no flags
Details
Working example
(474 bytes, text/html)
2009-11-27 15:30 PST
,
Daniel Bates
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jakub Nesetril
Comment 1
2005-06-16 19:38:42 PDT
Created
attachment 2413
[details]
Testcase - drop text onto the textarea
mikepk
Comment 2
2007-04-02 13:54:28 PDT
I would add that it'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).
Julie Parent
Comment 3
2009-05-06 00:10:14 PDT
drop also seems to never fire for contentEditable regions.
Daniel Bates
Comment 4
2009-11-27 15:27:37 PST
The test case (<
https://bugs.webkit.org/attachment.cgi?id=2413
>) 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, <
http://dev.w3.org/html5/spec/Overview.html#introduction-4
>. In particular, the spec. states, "to accept a drop, the drop target has to listen to at least three events: [dragenter, dragover, and drop]". 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.
Daniel Bates
Comment 5
2009-11-27 15:30:29 PST
Created
attachment 43973
[details]
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, "Caught drop."
Adele Peterson
Comment 6
2010-01-11 21:46:58 PST
Dan's analysis makes sense to me.
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