Problem : trying to simulate drag drop in frontend that uses angular-drag-and-drop-lists (go to detailed description)
Tried :
Custom event needed to adjusted like this :
function createCustomEvent(type) {
var event = new CustomEvent("CustomEvent", {"cancelable": true})
event.initCustomEvent(type, true, true, null);
event.dataTransfer = {
data: {
},
setData: function(type,val) {
this.data[type] = val
this.types[0] = type
}
getData: function(type) {
return this.data[type]
},
dropEffect: 'move',
effectAllowed:'move',
types: [],
items: {},
files:{}
}
return event
}
in native js drag drop script and then it works fine