Drag and drop is broken; however, this problem is alleviated when the second ".then()" block under drop is commented out. Is the second ".then()" block really needed?
Proposed fix (starting from drop):
drop(clientPosition = {}) {
return this.target
.trigger('drop', {
dataTransfer,
eventConstructor: 'DragEvent',
...this.options.target,
})
.then(() => {
if (isAttached(this.targetElement)) {
this.target
.trigger('mouseup', {
which: 1,
button: 0,
...clientPosition,
eventConstructor: 'MouseEvent',
...this.options.target,
})
// .then(() => {
// if (isAttached(this.targetElement)) {
// this.target.trigger('pointerup', {
// which: 1,
// button: 0,
// ...clientPosition,
// eventConstructor: 'PointerEvent',
// ...this.options.target,
// })
// }
// })
}
})
},
Drag and drop is broken; however, this problem is alleviated when the second ".then()" block under drop is commented out. Is the second ".then()" block really needed?
Proposed fix (starting from drop):
drop(clientPosition = {}) {
return this.target
.trigger('drop', {
dataTransfer,
eventConstructor: 'DragEvent',
...this.options.target,
})
.then(() => {
if (isAttached(this.targetElement)) {
this.target
.trigger('mouseup', {
which: 1,
button: 0,
...clientPosition,
eventConstructor: 'MouseEvent',
...this.options.target,
})
// .then(() => {
// if (isAttached(this.targetElement)) {
// this.target.trigger('pointerup', {
// which: 1,
// button: 0,
// ...clientPosition,
// eventConstructor: 'PointerEvent',
// ...this.options.target,
// })
// }
// })
}
})
},