Skip to content

fix: add position:relative to .interactive-session for dnd overlay#956

Open
octo-patch wants to merge 1 commit intovoideditor:mainfrom
octo-patch:fix/issue-925-chat-dnd-overlay-positioning
Open

fix: add position:relative to .interactive-session for dnd overlay#956
octo-patch wants to merge 1 commit intovoideditor:mainfrom
octo-patch:fix/issue-925-chat-dnd-overlay-positioning

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #925

Problem

Dragging files from the Explorer to the Chat panel does not show the blue drop overlay. The .chat-dnd-overlay element uses position: absolute to cover the chat session container, but its parent .interactive-session was missing position: relative. Without a positioning context on the parent, the absolutely-positioned overlay is anchored to a wrong ancestor element (e.g., the viewport), causing it to render off-screen with no visible feedback during drag operations.

Solution

Add position: relative to .interactive-session in chat.css. This provides the correct positioning context so .chat-dnd-overlay is sized and positioned relative to the chat panel rather than a distant ancestor.

/* Before */
.interactive-session {
    max-width: 850px;
    margin: auto;
}

/* After */
.interactive-session {
    max-width: 850px;
    margin: auto;
    position: relative;
}

Testing

  • Drag a file from the Explorer panel into the Chat panel — the blue overlay now appears correctly
  • Existing drag-and-drop logic in chatDragAndDrop.ts is unchanged; this is a one-line CSS-only fix
  • No regressions to layout: position: relative without explicit top/left/width/height has no visual side effects on the container itself

…ixes voideditor#925)

The .chat-dnd-overlay element uses position:absolute to cover the chat
panel during drag-and-drop, but its parent .interactive-session lacked
a positioning context (position:relative). This caused the overlay to
be positioned relative to a wrong ancestor, making it appear off-screen
or in an incorrect location with no visual feedback during drag operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] File drag-and-drop to chat panel doesn't show overlay - missing CSS position: relative

1 participant