Skip to content
Permalink
Browse files

Droppable: Unset visible on disabled/unaccepting droppables

Droppables initially start off with visible undefined, and previously
could get in a state where visible was set to true while not accepting
a draggable. In this state, drag code will continue to update onover
and onout on the droppable instead of ignoring the droppable.

This is problematic if, for example, the droppable then starts
accepting the draggable: if the draggable is already over the droppable
then isover will already be set to true, and so the the droppable will
not get an over event.

Set visible back to the initial state of undefined if the droppable is
disabled or not accepting of the draggable.

Fixes #9758
  • Loading branch information...
bhiggins committed Jan 21, 2014
1 parent 2ef1b16 commit 2228050b2c3312267ade756168419b972721f157
Showing with 1 addition and 0 deletions.
  1. +1 −0 ui/jquery.ui.droppable.js
@@ -280,6 +280,7 @@ $.ui.ddmanager = {

// No disabled and non-accepted
if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {
m[ i ].visible = undefined;
continue;
}

0 comments on commit 2228050

Please sign in to comment.
You can’t perform that action at this time.