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

Why is dropActive true outside specified drop element? #406

Open
jacobg opened this issue Aug 25, 2021 · 1 comment
Open

Why is dropActive true outside specified drop element? #406

jacobg opened this issue Aug 25, 2021 · 1 comment

Comments

@jacobg
Copy link

jacobg commented Aug 25, 2021

In the following code:

if (this.dropElement) {
document.addEventListener('dragenter', this.onDragenter, false)
document.addEventListener('dragleave', this.onDragleave, false)
document.addEventListener('drop', this.onDocumentDrop, false)
this.dropElement.addEventListener('dragover', this.onDragover, false)
this.dropElement.addEventListener('drop', this.onDrop, false)
}

Why is the component listening for dragenter on the entire document? If the application wants to use the dropActive property to animate the component, then it seems it should only be setting dropActive = true when it's inside the drop element.

@Linhongbin-1111
Copy link

I also don't understand. I hope there is a prop that can be set.

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

2 participants