All users were logged out of Bugzilla on October 13th, 2018

textboxes accept any dropped data

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: enndeakin, Assigned: enndeakin)

Tracking

Trunk
x86
All
Points:
---
Bug Flags:
in-litmus ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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.
(Assignee)

Comment 1

10 years ago
Created attachment 338121 [details] [diff] [review]
move preventDefault to only occur when a drop is allowed

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)

Updated

10 years ago
Attachment #338121 - Flags: superreview?(neil)
Attachment #338121 - Flags: superreview+
Attachment #338121 - Flags: review?(neil)
Attachment #338121 - Flags: review+
Flags: in-litmus?

Updated

10 years ago
Blocks: 429495
(Assignee)

Updated

10 years ago
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 2

10 years ago
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.