Closed Bug 454595 Opened 13 years ago Closed 13 years ago

textboxes accept any dropped data

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: enndeakin, Assigned: enndeakin)

References

Details

Attachments

(1 file)

Textboxes should only accept text or text-like dragged data (or files for input type="file"). Right now, code at http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/text/nsEditorEventListeners.cpp#578 is always canceling the dragover event which in new-spec-land means allow a drop.
To reproduce this bug:

1. Drag something that doesn't have text data. For example, in Firefox, the items in the Manage Search Engines list. (Looks like attachments in Thunderbird might do this too, not sure).
2. Drag it onto a textbox. Note that the data seems to be droppable on the textbox even though it shouldn't be allowed.

In the dnd spec, cancelling the dragover event is the way to accept a drop, so we need to ensure that the editor only cancels the event in this case.
Attachment #338121 - Flags: superreview?(neil)
Attachment #338121 - Flags: review?(neil)
Attachment #338121 - Flags: superreview?(neil)
Attachment #338121 - Flags: superreview+
Attachment #338121 - Flags: review?(neil)
Attachment #338121 - Flags: review+
Flags: in-litmus?
Blocks: 429495
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
i was looking around for the push changeset :) here it is:
http://hg.mozilla.org/mozilla-central/rev/ecb32d66071e
You need to log in before you can comment on or make changes to this bug.