Skip to content

Commit c0ed449

Browse files
committed
fix[dragTable]: fixed bug in Firefox
1 parent a48a1bd commit c0ed449

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/views/example/table/dragTable.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ export default {
110110
const el = document.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
111111
this.sortable = Sortable.create(el, {
112112
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
113+
setData: function(dataTransfer) {
114+
dataTransfer.setData('Text', '')
115+
// to avoid Firefox bug
116+
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
117+
},
113118
onEnd: evt => {
114119
const targetRow = this.list.splice(evt.oldIndex, 1)[0]
115120
this.list.splice(evt.newIndex, 0, targetRow)

0 commit comments

Comments
 (0)