[Vuejs]-Removing the "drag and drop ghost element" on drop in Vue 3

0👍

Turns out it was the default functionality of dragenter and dragover on the dropzone. Adding @dragenter.prevent and @dragover.prevent fixed the problem.

     <div
        @dragenter.prevent
        @dragover.prevent
        @dragover="dragOverHandler(col)"
        id="board-cols"
        :ref="col"
        class="whitespace-nowrap w-72 mx-2 px-2"
        :class="toStatus === col && 'bg-gray-200'"
        v-for="(col, i) in columns"
        :key="i"
      >

Very strange default behavior in my opinion.

Leave a comment