Open Bug 780526 Opened 13 years ago Updated 5 years ago

Event listener isn't called on drag an element

Categories

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

14 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: wiltave, Unassigned)

References

Details

Attachments

(1 file)

Attached file drag-and-drop.html
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 Iceweasel/10.0.6 Build ID: 20120717093035 Steps to reproduce: I've create a code (http://jsfiddle.net/EeddL/) with an HTML div. I've registered the drag event. Actual results: The event isn't called in Firefox. Expected results: Like in Chromium (20.0.1132.57 Debian wheezy/sid (f14a6e4)) and Opera (12.01 Build 1532), the drag event listener must be called and display event.clientX and event.clientY.
Attachment #649155 - Attachment mime type: text/plain → text/html
The drag event will be fired if you set any data to dataTransfer in dragstart event handler. div.addEventListener('dragstart', function(e){ // xxxx something to set dataTransfer e.dataTransfer.setData('Text', e.target.textContent); });
Component: Untriaged → Drag and Drop
Product: Firefox → Core
You're right. Why is it just required by Firefox? What if I don't need to pass data, just move the target element, for example. In this case it wouldn't make sense (at least to me). Why event.clientX and event.clientY are always 0 just in Firefox? Thank you.
(In reply to Willian Gustavo Veiga from comment #2) Why event.clientX and event.clientY > are always 0 just in Firefox? May be Bug 505521

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: