From ceccae2aa8809a991ad7c3e841f64a301a19ef6c Mon Sep 17 00:00:00 2001 From: Sameer Ababneh Date: Wed, 28 Oct 2015 15:06:17 +0200 Subject: [PATCH] placeholder appears at the end of the list when dragging from one list to another ( when the connectWith option is used ) --- jquery.sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.sortable.js b/jquery.sortable.js index 2ebca6f..1a82001 100644 --- a/jquery.sortable.js +++ b/jquery.sortable.js @@ -74,7 +74,7 @@ $.fn.sortable = function(options) { dragging.hide(); $(this)[placeholder.index() < $(this).index() ? 'after' : 'before'](placeholder); placeholders.not(placeholder).detach(); - } else if (!placeholders.is(this) && !$(this).children(options.items).length) { + } else if (!placeholders.is(this) && !$(this).children(options.items).filter( ".sortable-placeholder:visible" ).length) { placeholders.detach(); $(this).append(placeholder); }