YUI: DragDrop only fire drop event

This example shows how to make DragDrop only fire the onDragDrop event. It will not fire the other stamdard events.

Basically all we are doing is creating a copy of the YAHOO.util.DragDropMgr.fireEvents (YAHOO.util.DragDropMgr._fireEvents) method and creating a new one.

Now, we put some simple logic in the new fireEvents method to call the copy _fireEvents only if the isDrop parameter is set to true.

Jump to the code

Drop
Drag

The Javascript