]> source.dussan.org Git - jquery-ui.git/commitdiff
Droppable: Don't use .parentsUntil(). Fixes #7530 - Droppable fails on a.element...
authorScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 14:06:52 +0000 (10:06 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 14:06:52 +0000 (10:06 -0400)
ui/jquery.ui.droppable.js

index 58a1c4bc197f5d020220eb8be2ea973aab89a3f9..dabf29d6c76f6322003fa89238b912187907f919 100644 (file)
@@ -240,7 +240,7 @@ $.ui.ddmanager = {
        },
        dragStart: function( draggable, event ) {
                //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
-               draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+               draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
                        if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
                });
        },
@@ -287,7 +287,7 @@ $.ui.ddmanager = {
 
        },
        dragStop: function( draggable, event ) {
-               draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+               draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
                //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
                if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
        }