-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Bug Description
Dragging files from the Explorer to the Chat panel doesn't show the blue drop overlay, and users cannot visually confirm that drag-and-drop is working. The files may or may not be added to the chat context, but there's no visual feedback.
Steps to Reproduce
- Open Void IDE
- Open a project folder
- Open the Chat panel (
Ctrl+L) - Drag a file from the Explorer to the chat input area
- Expected: Blue overlay appears with "Attach [file] as Context" text
- Actual: No overlay appears, no visual feedback
Root Cause Analysis
After investigating the source code, I found the issue in src/vs/workbench/contrib/chat/browser/media/chat.css:
The .chat-dnd-overlay element uses position: absolute (lines 545-560):
.interactive-session .chat-dnd-overlay {
position: absolute;
top: 0;
left: 0;
/* ... */
}However, its parent .interactive-session (lines 6-9) is missing position: relative:
.interactive-session {
max-width: 850px;
margin: auto;
/* Missing: position: relative */
}Without position: relative on the parent, the absolutely positioned overlay is positioned relative to a wrong ancestor element, causing it to appear off-screen or in an incorrect location.
Proposed Fix
Add position: relative to .interactive-session:
.interactive-session {
max-width: 850px;
margin: auto;
position: relative; /* Fix: provide positioning context for chat-dnd-overlay */
}This is a one-line fix that ensures the drag-and-drop overlay is correctly positioned within the chat session container.
Environment
- Void Version: 1.4.x (also affects all branches including main, mcp, last-working-1.2.5)
- OS: Windows 11
- Verified in source code: All branches have this issue
Additional Context
- The drag events (
dragover,drop) are firing correctly - The
.chat-dnd-overlayelement exists in the DOM - The JavaScript logic in
chatDragAndDrop.tsis working correctly - Only the CSS positioning is broken
I'm happy to submit a PR if the team confirms this is the correct fix.