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-overlay element exists in the DOM
- The JavaScript logic in
chatDragAndDrop.ts is working correctly
- Only the CSS positioning is broken
I'm happy to submit a PR if the team confirms this is the correct fix.
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
Ctrl+L)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-overlayelement usesposition: absolute(lines 545-560):However, its parent
.interactive-session(lines 6-9) is missingposition: relative:Without
position: relativeon 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: relativeto.interactive-session:This is a one-line fix that ensures the drag-and-drop overlay is correctly positioned within the chat session container.
Environment
Additional Context
dragover,drop) are firing correctly.chat-dnd-overlayelement exists in the DOMchatDragAndDrop.tsis working correctlyI'm happy to submit a PR if the team confirms this is the correct fix.