fix: guard drag overlay to only trigger on external file drags#1554
Open
tharunika-19 wants to merge 2 commits into
Open
fix: guard drag overlay to only trigger on external file drags#1554tharunika-19 wants to merge 2 commits into
tharunika-19 wants to merge 2 commits into
Conversation
|
@tharunika-19 is attempting to deploy a commit to the magic-peach1's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
👋 Thanks for your PR, @tharunika-19!Welcome to Reframe — a browser-based video editor built for everyone 🎬 What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
Contributor
✅ PR Format Check Passed — @tharunika-19Basic format checks passed. A maintainer will review your code changes. This does not mean the PR is approved — it just means the format is correct. |
Author
|
Hi @magic-peach! Could a maintainer please approve the workflows so the build check can run? The PR format check has passed and the fix is ready for review. Happy to make any changes if needed! 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1515
What changed
Added
e.dataTransfer?.types?.includes("Files")guard to theonDragEnter,onDragLeave, andonDragOverhandlers inFileUpload.tsxRoot Cause
The global dragenter listener had no filter — it triggered on ALL drag events
including slider drags, causing the "Drop your video anywhere" overlay to appear
when dragging the Brightness slider.
Fix
The guard checks if the drag contains actual files before showing the overlay.
Slider drags have empty dataTransfer.types, so they are now correctly ignored.
Tested
✅ Brightness slider adjusts value normally without triggering overlay
✅ Contrast and Saturation sliders unaffected
✅ Dragging a real video file from desktop still shows overlay correctly