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: dropzone doesn't receive drop event #5415

Merged
merged 4 commits into from
Jan 29, 2025
Merged

Fix: dropzone doesn't receive drop event #5415

merged 4 commits into from
Jan 29, 2025

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented Jan 28, 2025

Changelog

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

Description

While the previous fix (#5394) addressed the visibility issue in certain cases, this PR further improves the drop zone behavior by ensuring it correctly receives outside drop events and handles them appropriately.

Design

  1. Added dragover event listener which prevents default browser behavior only when dragged inside the window to prevent unnecessary global event handlers
  2. Added detailed documentation explaining the relationship between dragover and drop events

Specific Changes

  • Added dynamic dragover event listener management
  • Enhanced type definition for dragover event handler to support both React and native events
  • Improved comment explaining browser drag and drop behavior
  • Reorder listeners
  • 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 January 29, 2025 19:08
@OEvgeny OEvgeny merged commit b40802d into main Jan 29, 2025
28 checks passed
@OEvgeny OEvgeny deleted the fix/dropzome-fix branch January 29, 2025 20:11
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
2 participants