fix: guard drag overlay to only trigger on external file drags#1554
fix: guard drag overlay to only trigger on external file drags#1554tharunika-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. |
👋 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! 🎉 |
✅ 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. |
|
Hi @magic-peach! Can you 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! 😊 |
|
Hi @magic-peach actually its being 4 days I have submitted this pr ! Could you 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! 😊 |
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