Closed
Bug 527749
Opened 15 years ago
Closed 14 years ago
Drag events out of order
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: dbates, Assigned: enndeakin)
References
Details
(Keywords: html5)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 The drag-and-drop processing model used in Firefox does not conform to section 7.9.4 of the HTML 5 spec. <http://dev.w3.org/html5/spec/Overview.html#drag-and-drop-processing-model>. In particular, the order of dragenter and dragleave events are reversed in Firefox. That is, Firefox fires dragleave then dragenter, but it should be dragenter then dragleave. This issues is similar to an drag event ordering issue in WebKit bug #30754 <https://bugs.webkit.org/show_bug.cgi?id=30754>. Reproducible: Always
Reporter | ||
Comment 1•15 years ago
|
||
Test case derived from a similar WebKit test.
Confirmed on trunk.
Status: UNCONFIRMED → NEW
Component: General → Drag and Drop
Ever confirmed: true
Keywords: html5
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → drag-drop
Hardware: x86 → All
Version: unspecified → Trunk
http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventStateManager.cpp#3812 Should be a pretty simple fix.
Probably a quick fix for somebody familiar with the code and an HTML5 compliance win. Nominating for blocking.
blocking2.0: --- → ?
Comment 7•14 years ago
|
||
Enn, can you take this? (And hopefully get a test into the HTML test suite, if such a thing exists.)
Assignee: nobody → enndeakin
blocking2.0: ? → betaN+
Assignee | ||
Comment 8•14 years ago
|
||
This patch moves the dragleave event to fire after the dragenter event. For developers that want the more sensible event order, including the places in browser, editor and toolbar customization code, the dragexit event still fires before the dragenter event as before. The event order then is: dragexit, dragenter, dragleave Can't be tested automatically. Works with the testcase.
Assignee | ||
Updated•14 years ago
|
Attachment #492371 -
Flags: review?(Olli.Pettay)
Assignee | ||
Updated•14 years ago
|
Attachment #492371 -
Flags: review?(dao)
Updated•14 years ago
|
Attachment #492371 -
Flags: review?(dao) → review+
Updated•14 years ago
|
Whiteboard: [needs review smaug]
Comment 9•14 years ago
|
||
This is rather strange. Why should dragenter fire before dragleave? Is this something that IE does always? I guess I need to test IE. Could we just change HTML5 draft?
Assignee | ||
Comment 10•14 years ago
|
||
IE always fires dragenter before dragleave. About a year ago, Webkit was changed to this behaviour as well. Changing our behaviour could have compatibility issues for us which is why I had to change code to use the dragexit event. Likely though, there would be less of a problem to go from the IE behaviour to our behaviour as I can't see why the unusual event order would be useful and relied on.
Comment 11•14 years ago
|
||
Yeah the IE behaviour (and thus the spec) is pretty nutty here. dropexit seems like a reasonable idea; if you'd like it formalised and specced please feel free to mail the WHATWG list mentioning it.
Updated•14 years ago
|
Attachment #492371 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [needs review smaug]
Comment 12•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/d11d8ac9ffe3
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
You need to log in
before you can comment on or make changes to this bug.
Description
•