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

fix: dropping file out of drop zone makes it stuck in visible state #5394

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented Dec 16, 2024

Fixes #5390

Changelog Entry

Fixed

  • Fixed #5390. Fixed drop zone remaining visible when file is dropped outside of the zone, in PR #5394, by @OEvgeny

Description

When dragging a file over the application and dropping it outside of the designated drop zone, the drop zone overlay remained visible instead of being hidden. This PR fixes the issue by properly handling the drop event at the document level, ensuring the drop zone state is reset regardless of where the file is dropped.

Specific Changes

  • Added document-level drop event listener with capture phase
  • Removed false parameter from event listeners as it's the default behavior
  • Added cleanup for the drop event listener in the useEffect cleanup function
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny OEvgeny marked this pull request as ready for review December 16, 2024 20:21
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

Successfully merging this pull request may close these issues.

Dropzone sendbox stuck in droppable state when drop outside of Dropzone
1 participant