Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item disappears when start dragging from the right but immediatly drop it (within the available pane) #8

Open
michael opened this issue Jun 22, 2009 · 6 comments
Labels

Comments

@michael
Copy link
Owner

michael commented Jun 22, 2009

No description provided.

@ericmmartin
Copy link

I noticed that too. I fixed it by changing:
} else if (!opts[side].sortable) {

to:
} else if (!opts[side].sortable && side !== 'available') {

Not sure if that is the best way, but it works ;)

@gnlyn
Copy link

gnlyn commented Feb 10, 2010

I found another method to fix that. I commented out the line
ui.draggable.hide();
and it seems to work fine.

@yanickrochon
Copy link
Collaborator

yes, we worked hard to make droppable and sortable work... we will take a look at this as soon as we can. For now, these fix may work, but you should also test all combinaisons of options ("droppable" and "sortable") to make sure it works for all use cases. If we can't fix this, we will simply limit the number of combinaisons for the most common use cases. You are welcome to help! :)

@arpego
Copy link

arpego commented Jan 5, 2011

Making the fixes above i noticed that the 'revert' effect disapear too, so i modified the code below, adding the value 'valid' to revert property:

// make draggable
elements.each(function() {
$(this).parent().draggable({
connectToSortable: that.selectedList,
helper: _dragHelper,
appendTo: that.container,
containment: that.container,
revert: 'valid'
});
});

@SimonCropp
Copy link

Any update on this?

@8riaN
Copy link

8riaN commented Jan 28, 2012

I fixed it by checking the class of the parent. I really wanted to figure out how to get it to use a revert animation, but I think you'd need that logic to be in the draggable and I wasn't sure how to handle a drop event from within the dragable context, so I just gave up. I'd love to see an implementation of this that got the revert animation in there, too.

// received an item from a sortable to a droppable
} else if (!opts[side].sortable) {
if (ui.draggable.parent().hasClass(side)) {
return false;
} else {
setTimeout(function(){
ui.draggable.hide();
that._setSelected(ui.draggable, itemSelected);
}, 10);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants