Skip to content

Commit

Permalink
Droppable: Unset visible on disabled/unaccepting droppables
Browse files Browse the repository at this point in the history
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 2228050
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/jquery.ui.droppable.js
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2228050

Please sign in to comment.