Skip to content

fix: guard drag overlay to only trigger on external file drags#1554

Open
tharunika-19 wants to merge 2 commits into
magic-peach:mainfrom
tharunika-19:fix/brightness-slider-drag
Open

fix: guard drag overlay to only trigger on external file drags#1554
tharunika-19 wants to merge 2 commits into
magic-peach:mainfrom
tharunika-19:fix/brightness-slider-drag

Conversation

@tharunika-19

Copy link
Copy Markdown

Fixes #1515

What changed

Added e.dataTransfer?.types?.includes("Files") guard to the onDragEnter,
onDragLeave, and onDragOver handlers in FileUpload.tsx

Root 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

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

@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.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @tharunika-19!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added level:beginner Beginner level - 20 pts type:bug Bug fix labels Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @tharunika-19

Basic 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.

@tharunika-19 tharunika-19 changed the title Fix/brightness slider drag fix: guard drag overlay to only trigger on external file drags Jun 8, 2026
@tharunika-19

Copy link
Copy Markdown
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! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:beginner Beginner level - 20 pts type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UX Bug] Dragging Brightness slider triggers global drag-and-drop overlay instead of adjusting value

1 participant