diff --git a/src/components/DndList/index.vue b/src/components/DndList/index.vue index a4643c0a..23ca006e 100644 --- a/src/components/DndList/index.vue +++ b/src/components/DndList/index.vue @@ -2,7 +2,7 @@

{{ list1Title }}

- +
{{ element.id }}[{{ element.author }}] {{ element.title }} @@ -94,6 +94,11 @@ export default { if (this.isNotInList1(ele)) { this.list1.push(ele) } + }, + setData(dataTransfer) { + // to avoid Firefox bug + // Detail see : https://github.com/RubaXa/Sortable/issues/1012 + dataTransfer.setData('Text', '') } } } diff --git a/src/components/Kanban/index.vue b/src/components/Kanban/index.vue index 1171b5b8..c2cb4691 100644 --- a/src/components/Kanban/index.vue +++ b/src/components/Kanban/index.vue @@ -7,6 +7,7 @@ :list="list" v-bind="$attrs" class="board-column-content" + :set-data="setData" >
{{ element.name }} {{ element.id }} @@ -39,6 +40,13 @@ export default { return [] } } + }, + methods: { + setData(dataTransfer) { + // to avoid Firefox bug + // Detail see : https://github.com/RubaXa/Sortable/issues/1012 + dataTransfer.setData('Text', '') + } } } diff --git a/src/views/table/dragTable.vue b/src/views/table/dragTable.vue index 50077c6c..7abbd932 100644 --- a/src/views/table/dragTable.vue +++ b/src/views/table/dragTable.vue @@ -113,9 +113,9 @@ export default { this.sortable = Sortable.create(el, { ghostClass: 'sortable-ghost', // Class name for the drop placeholder, setData: function(dataTransfer) { - dataTransfer.setData('Text', '') // to avoid Firefox bug // Detail see : https://github.com/RubaXa/Sortable/issues/1012 + dataTransfer.setData('Text', '') }, onEnd: evt => { const targetRow = this.list.splice(evt.oldIndex, 1)[0]