Closed Bug 390934 Opened 13 years ago Closed 13 years ago

When document contains contenteditable element, drag-dropping seems possible anywhere in the document

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9

People

(Reporter: martijn.martijn, Assigned: peterv)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

See testcase, which comes from bug 389372.

Drag some text from outside the contenteditable element and move it around in the document.
You never get the 'not-allowed' mouse cursor anymore, even when you drag over stuff where you can't drop it on.
And with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b2pre) Gecko/2007111312 Minefield/3.0b2pre ID:2007111312, I get a consistent crash when drag-dropping a text this way.
That's bug 403664 (should be fixed in today's build).
Some additional information on this bug. It seems to insert a BR element each time you drop contents. I've made another test case page for this behavior.

http://tinymce.moxiecode.com/gecko/contenteditable_dragdrop.htm
Attached patch v1 (diff -w)Splinter Review
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Comment on attachment 316040 [details] [diff] [review]
v1 (diff -w)

The editor's drag listener should bail out if the drag is over non-editable content and let the other handlers deal with it. Still working on an automated testcase.
Attachment #316040 - Flags: superreview?(jst)
Attachment #316040 - Flags: review?(jst)
Comment on attachment 316040 [details] [diff] [review]
v1 (diff -w)

Looks good, r+sr=jst
Attachment #316040 - Flags: superreview?(jst)
Attachment #316040 - Flags: superreview+
Attachment #316040 - Flags: review?(jst)
Attachment #316040 - Flags: review+
Comment on attachment 316040 [details] [diff] [review]
v1 (diff -w)

Simple fix, low risk. Haven't found a way yet to write an automated test for this.
Attachment #316040 - Flags: approval1.9?
Comment on attachment 316040 [details] [diff] [review]
v1 (diff -w)

a1.9=beltzner
Attachment #316040 - Flags: approval1.9? → approval1.9+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
You need to log in before you can comment on or make changes to this bug.