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

Dropzone.Fullscreen stays open after first drop #4580

Closed
esheliko opened this issue Jul 27, 2023 · 1 comment
Closed

Dropzone.Fullscreen stays open after first drop #4580

esheliko opened this issue Jul 27, 2023 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@esheliko
Copy link

What package has an issue

@mantine/dropzone

Describe the bug

This can be reproduced in the mantive.dev website! here
(I'm using Chrome 115)

Steps to reproduce:

  • Activate fullscreen dropzone
  • Drag&Drop any file
  • (if the file was an image, you need to re-activate the dropzone)
  • Drag an image over the dropzone but cancel (i.e. press ESC or drag back outside of window)

You will see that the dropzone stays open and in fact renders the user stuck unless they drop a file.

What version of @mantine/hooks page do you have in package.json?

6.0.17

If possible, please include a link to a codesandbox with the reproduced problem

https://mantine.dev/others/dropzone/#dropzonefullscreen-component

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

The problem seems to be with the inner counter of drag events inside the Dropzone.Fullscreen component.
When you drop a file you don't get a 'dragleave' event so the counter stays at 1.
I think resetting the counter to 0 when the user drops a file could solve the problem.

esheliko added a commit to esheliko/mantine that referenced this issue Jul 27, 2023
rtivital added a commit that referenced this issue Sep 21, 2023
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Sep 21, 2023
@rtivital
Copy link
Member

The issue is resolved in 7.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants