Sortable
Sortable copied to clipboard
[bug] MultiDrag: Avoid selecting an item when scrolling with a touch device
When you finish scrolling a list with a touch device and multiDrag is enabled, the element I clicked on to start scrolling is selected. I would like the element not to be selected.
To reproduce it I create a simle sortable list
Sortable.create(list, {
group: 'shared',
multiDrag: true,
selectedClass: "selected",
animation: 150,
delay: 500,
delayOnTouchOnly: true,
disabled: false
});
<div id="list" class="list-group">
<div class="list-group-item">Item 1</div>
<div class="list-group-item">Item 2</div>
<div class="list-group-item">Item 3</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
<div class="list-group-item">Item 4</div>
<div class="list-group-item">Item 5</div>
</div>
and try scrolling the list with a touch device.
You don't want delay, you want fallbackTolerance. See here: https://sortablejs.github.io/Sortable/#multi-drag
@owen-m1, sorry, maybe I didn't make myself clear.
My problem is that I can't select an item and then scroll through the list and select another item that was not previously visible in the view. I cannot do this because the element that I touched to start scrolling becomes selected when I take my finger off the screen (end scrolling).
This happens, both when I use fallbackTolerance and when I use delay.
Running into this issue as well. Any workarounds?
This is a big issue that needs resolving. MultiDrag sortables on touch devices should require one or more items to be explicitly selected (tapped) before dragging, otherwise it makes scrolling impossible.
I also encountered the same situation. After setting MultiDrag, the onSelect event will be triggered during the list scrolling. Has this problem been fixed?