fix[Drag]: fixed drag bug in firefox (#1841)

This commit is contained in:
花裤衩
2019-04-04 16:21:45 +08:00
committed by GitHub
parent e363c7a77b
commit 0d40222b64
3 changed files with 15 additions and 2 deletions

View File

@@ -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]