platforms - all OS - all 2001-10-22-0.9.4 branch build (NS6.2) 2001-11-26-6.2.1 rtm build (NS6.2.1) Open the testcase and dragdrop any file or link onto this window. expected: an alert box is supposed to be displayed with the message "ondragdrop event has been triggered" actual: the ondragdrop JS event is not getting triggered. works fine on NS4.77
Is this really something we want untrusted web content to be able to detect?
It doesn't seem that this event is implemented. It's also possible that I'm not using it correctly, but there isn't much documentation available (only found http://www.mozilla.org/docs/dom/domref/dom_window_ref57.html#1018270, which doesn't say much).
Note that this works in NS4 and that this is useful for creating a web kiosk (see bug 152080).
Assignee: joki → saari
QA Contact: trix → ian
Those are documented for Netscape 4, not for Mozilla.
(In reply to comment #7) > Those are documented for Netscape 4, not for Mozilla. http://www.mozilla.org/docs/dom/domref/dom_window_ref57.html window.ondragdrop An event handler for drag & drop events sent to the window. [...] Although at the bottom it says: Specification DOM Level 0. Not part of specification. and I haven't been able to figure out yet whether that means not part of the W3C spec., but part of Mozilla's spec., or the opposite. Probably the former, if this is the applicable W3C spec: (I don't see a "Level 0" spec. (unless that's shorthand for saying it isn't in the spec.), but DOM Level 2 is from the same time period as the Mozilla document) http://www.w3.org/TR/DOM-Level-2-Events/ The section specifically on ECMAScript Language Binding: http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html or the newer DOM Level 3 equivalents: http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/ http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/ecma-script-binding.html None mention window.ondragdrop. I see the HTML 4.01 spec. also doesn't list an "ondragdrop" event handler attribute: http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.3 which probably explains why it isn't implemented in Mozilla. Maybe the needed patch is for the Mozilla spec. instead of the code. Ideally leaving a placeholder referring people to the newer document.addEventListener() API. I'm still curious to know why this was dropped, but that will probably require data mining in the W3C working group list archives...
Interestingly, other drag events _are_ being triggered, just not dragdrop. Dragenter, dragover, dragexit, are all being triggered. Dragdrop isn't included in that list. Here's a snippet of logged events arising from dragging an image from one frame into another: EVTYPE:dragenter EVTYPE:dragenter EVTYPE:dragover EVTYPE:dragexit EVTYPE:dragenter EVTYPE:dragover EVTYPE:dragexit EVTYPE:dragenter EVTYPE:dragover Clarification: the destination frame into which I am dragging elements (imgs) has an event handler that logs these events. What is also interesting is that mouse events are not registered until I release the held-mouse button that should terminate the drag. I'd assume that this would consist of a mouseup event, but no mouseup event is registered at that time. I must press the mouse button a second time before a mouseup event actually is sent. Tom Metro's previous comment seems to suggest that addEventListener documentation provides an authoritative account of what the mozilla browser supports and what it does not, yet the mozilla DOM documentation does describe dragenter, dragover, dragexit, dragdrop events, and my above test case does employ addEventListener to attach event handlers. If there is confusion regarding what the mozilla browser does and does not support, then this confusion has not yet been cleared up by mozilla documentation.
(In reply to comment #10) > Any updates? Pardon my faux pas of providing no material benefit to the bug. This bug is still present in FF3.0 It seems like it would be a very useful feature, especially in light of AJAX tools that do things like edit images (flickr, etc.) or edit documents (google docs). Is there a decision being made behind the scenes or subconsciously (even inaction is an action) that isn't documented here? Ciao!
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.