Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
philliplammi opened this issue Jan 22, 2024 · 0 comments
Open

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

philliplammi opened this issue Jan 22, 2024 · 0 comments

Comments

@philliplammi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant