Don't fire DragDrop2:end either if the element wasn't moved.
authorJan Schneider <jan@horde.org>
Tue, 16 Mar 2010 16:02:25 +0000 (17:02 +0100)
committerJan Schneider <jan@horde.org>
Tue, 16 Mar 2010 16:02:25 +0000 (17:02 +0100)
horde/js/dragdrop2.js

index e685b67..c2c6ad6 100644 (file)
@@ -446,7 +446,9 @@ Drag = Class.create({
             DragDrop.Drags.cover.down().siblings().invoke('remove');
         }
 
-        this.element.fire('DragDrop2:end', e);
+        if (this.wasMoved) {
+            this.element.fire('DragDrop2:end', e);
+        }
     },
 
     _onMoveDrag: function(xy, e)