Author: reebalazs
Date: Thu May 17 15:40:19 2007
New Revision: 43455

Modified:
   
kukit/azax/branch/1.1-ree-plugin-dad/plugins/draganddrop/browser/kss_dragdrop.js
Log:
Fix dropping after the last element in a container

Modified: 
kukit/azax/branch/1.1-ree-plugin-dad/plugins/draganddrop/browser/kss_dragdrop.js
==============================================================================
--- 
kukit/azax/branch/1.1-ree-plugin-dad/plugins/draganddrop/browser/kss_dragdrop.js
    (original)
+++ 
kukit/azax/branch/1.1-ree-plugin-dad/plugins/draganddrop/browser/kss_dragdrop.js
    Thu May 17 15:40:19 2007
@@ -323,6 +323,11 @@
     if (newIds[i+1] == originalIds[i]) {
         parms.dragid = newIds[i];
         parms.dropid = newIds[i+1];
+        // here, dropid can be undefined if we drop after the last one.
+        // If this happens, we give the container node as a target.
+        if (! parms.dropid) {
+            parms.dropid = element.id;
+        }
     } else if (newIds[i] == originalIds[i+1]) {
         // now we found the dragged elem, we just need to find
         // where it was dropped
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to