-
-
Notifications
You must be signed in to change notification settings - Fork 17
fix: prevent overlay flicker during drag-and-drop #129
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
Conversation
✅ Deploy Preview for eslint-code-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes overlay flicker during drag-and-drop operations in the editor by implementing a more robust drag state management system and preventing browser navigation during file drops.
- Enhanced the debounce utility function to include a cancel method for cleanup
- Implemented drag depth tracking to prevent flicker when dragging over nested elements
- Replaced manual DOM manipulation with proper React state updates for file content insertion
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib/utils.ts | Enhanced debounce function with cancel method and improved timeout typing |
| src/components/editor.tsx | Implemented drag depth tracking, simplified overlay logic, and improved drag-and-drop handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
nzakas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Prerequisites checklist
What is the purpose of this pull request?
This PR improves the editor’s drag-and-drop experience by eliminating overlay flicker while dragging within the editor and ensuring that dropping a file reliably inserts its content instead of triggering browser navigation.
What changes did you make? (Give an overview)
Related Issues
Fixes #128
Is there anything you'd like reviewers to focus on?