Skip to content

Commit 7b3e6a8

Browse files
committed
Droppable: Don't use .parentsUntil(). Fixes #7530 - Droppable fails on a.element.parentsuntil in version 1.8.14.
1 parent 930c650 commit 7b3e6a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.droppable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ $.ui.ddmanager = {
240240
},
241241
dragStart: function( draggable, event ) {
242242
//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
243-
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
243+
draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
244244
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
245245
});
246246
},
@@ -287,7 +287,7 @@ $.ui.ddmanager = {
287287

288288
},
289289
dragStop: function( draggable, event ) {
290-
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
290+
draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
291291
//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
292292
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
293293
}

0 commit comments

Comments
 (0)