Skip to content

Drag and drop doesn't work with pointerup trigger for drop #147

@philliplammi

Description

@philliplammi

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,
// })
// }
// })
}
})
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions