Open joecarl opened 4 years ago
@joecarl Thank you for your example.
Off the top of my head, it's probably something to do with a click event and the Sortable state not syncing up correctly.
@joecarl I know this was ages ago but I think this works with
$('.yourclass').each(function () {
Sortable.utils.select($(this)[0]);
});
by owen: https://jsbin.com/qafomak/edit?html,css,js,console,output
Problem:
When I call
Sortable.utils.select(element)
right afterSortable.create
I have to manually click on two elements to get it working properly.In the following JSbin there is a minimal version of the problem.
https://jsbin.com/muciyeluso/edit?html,js,output
As you can see the first item is autoselected, then if I click on the second element both get selected, this is the problem that shouldn't happen, only the second one should be selected after that action (since there's no ctrl key pressed). But then if I click on the third element everything starts working fine.
Is there any workaround to solve this? Or am I missing something?
Thanks in advance.