Skip to content

Commit 6fbd583

Browse files
committed
reply to the correct chat
1 parent 355ec30 commit 6fbd583

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/renderer/features/agents/main/active-chat.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3924,12 +3924,14 @@ const ChatViewInner = memo(function ChatViewInner({
39243924
return (
39253925
<SearchHighlightProvider>
39263926
<div className="flex flex-col flex-1 min-h-0 relative">
3927-
{/* Text selection popover for adding text to context */}
3928-
<TextSelectionPopover
3929-
onAddToContext={addTextContext}
3930-
onQuickComment={handleQuickComment}
3931-
onFocusInput={handleFocusInput}
3932-
/>
3927+
{/* Text selection popover for adding text to context - only render for active tab to prevent portaled popovers from inactive tabs capturing clicks */}
3928+
{isActive && (
3929+
<TextSelectionPopover
3930+
onAddToContext={addTextContext}
3931+
onQuickComment={handleQuickComment}
3932+
onFocusInput={handleFocusInput}
3933+
/>
3934+
)}
39333935

39343936
{/* Quick comment input */}
39353937
{quickCommentState && (

0 commit comments

Comments
 (0)