Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

How to detect original dragend event?

Open mastercodingbear opened this issue 3 years ago • 1 comments

Step by step scenario

I want to detect the original dragend event but it seems to not work with end event handler. dragstart works with start event handler.

Part of current code

<template>
...
   <VueDraggable 
        class="dragArea"
        :list="references" 
        :group="{ name: 'reference' }"
        @start="onDragStart"
        @end="onDragEnd"
        @dragstart="onOriginalDragStart"
        @dragend="onOriginalDragEnd">
...
</template>
<script>
...
   onDragStart(e) {
       console.log(e)
   }
   onDragEnd(e) {
       console.log(e)
   }
   onOriginalDragStart(e) {
       console.log(e)
   }
   onOriginalDragEnd(e) {
       console.log(e)   // not detected
   }
...
</script>

Expected Solution

or is there any other solution to detect the original dragend event?

mastercodingbear avatar Sep 02 '21 22:09 mastercodingbear

The@end event has an originalEvent property

jamesthomsondev avatar Sep 10 '21 05:09 jamesthomsondev