SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.92k stars 532 forks source link

Touch Events are not working properly. #61

Open sai-velamuri opened 3 years ago

sai-velamuri commented 3 years ago

I'm working with two draggable areas.

<draggable 
  v-model="myArray" 
  group="people" 
  @start="drag=true" 
  @end="drag=false" 
  item-key="id">
  <template #item="{element}">
    <div @click="fireEvent" // not working on some mobile phones
            @touchend.prevent="fireEvent">{{element.name}}</div>
   </template>
</draggable>
function fireEvent() {
  // my logic to shift items back and forth b/n lists
}

On touch I'm moving the item to another drag list. During testing there are inconsistencies in between devices. Is there anyway that we can have trigger touch event and it doesn't collide with drag events?

hanotao commented 2 years ago

Me too. You need to click twice