File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 22 <div class =" dndList" >
33 <div :style =" {width:width1}" class =" dndList-list" >
44 <h3 >{{ list1Title }}</h3 >
5- <draggable :list =" list1" group =" article" class =" dragArea" >
5+ <draggable :set-data = " setData " : list =" list1" group =" article" class =" dragArea" >
66 <div v-for =" element in list1" :key =" element.id" class =" list-complete-item" >
77 <div class =" list-complete-item-handle" >
88 {{ element.id }}[{{ element.author }}] {{ element.title }}
@@ -94,6 +94,11 @@ export default {
9494 if (this .isNotInList1 (ele)) {
9595 this .list1 .push (ele)
9696 }
97+ },
98+ setData (dataTransfer ) {
99+ // to avoid Firefox bug
100+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
101+ dataTransfer .setData (' Text' , ' ' )
97102 }
98103 }
99104}
Original file line number Diff line number Diff line change 77 :list =" list"
88 v-bind =" $attrs"
99 class =" board-column-content"
10+ :set-data =" setData"
1011 >
1112 <div v-for =" element in list" :key =" element.id" class =" board-item" >
1213 {{ element.name }} {{ element.id }}
@@ -39,6 +40,13 @@ export default {
3940 return []
4041 }
4142 }
43+ },
44+ methods: {
45+ setData (dataTransfer ) {
46+ // to avoid Firefox bug
47+ // Detail see : https://github.com/RubaXa/Sortable/issues/1012
48+ dataTransfer .setData (' Text' , ' ' )
49+ }
4250 }
4351}
4452 </script >
Original file line number Diff line number Diff line change @@ -113,9 +113,9 @@ export default {
113113 this .sortable = Sortable .create (el, {
114114 ghostClass: ' sortable-ghost' , // Class name for the drop placeholder,
115115 setData : function (dataTransfer ) {
116- dataTransfer .setData (' Text' , ' ' )
117116 // to avoid Firefox bug
118117 // Detail see : https://github.com/RubaXa/Sortable/issues/1012
118+ dataTransfer .setData (' Text' , ' ' )
119119 },
120120 onEnd : evt => {
121121 const targetRow = this .list .splice (evt .oldIndex , 1 )[0 ]
You can’t perform that action at this time.
0 commit comments