MDL-34328 Correct usage of e.drop when catching missed drag/drop events
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Tue, 18 Sep 2012 10:17:28 +0000 (11:17 +0100)
committerAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Fri, 21 Sep 2012 14:25:29 +0000 (15:25 +0100)
lib/yui/dragdrop/dragdrop.js

index 6669f37..4abbe55 100644 (file)
@@ -167,11 +167,11 @@ YUI.add('moodle-core-dragdrop', function(Y) {
             // we substitute them for the ease of use. For e.drop we use,
             // this.lastdroptarget (ghost node we use for indicating where to drop)
             e.drag = e.target;
+            e.drop = this.lastdroptarget;
             // Check that drop object belong to correct group
             if (!e.drop || !e.drop.inGroup(this.groups)) {
                 return;
             }
-            e.drop = this.lastdroptarget;
             this.drag_dropmiss(e);
         },