Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: The hover card referenced in the agent's floating dialog box is not fully displayed. (#17867)

balibabu479c3efd744a
diff --git a/web/src/components/floating-chat-widget-markdown.tsx b/web/src/components/floating-chat-widget-markdown.tsx
index b02332da2f..df61b30951 100644
--- a/web/src/components/floating-chat-widget-markdown.tsx
+++ b/web/src/components/floating-chat-widget-markdown.tsx
@@ -20,6 +20,7 @@ import { citationMarkerReg } from '@/utils/citation-utils';
import { getExtension } from '@/utils/document-util';
import { getDirAttribute } from '@/utils/text-direction';
import { InfoCircleOutlined } from '@ant-design/icons';
+import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
import classNames from 'classnames';
import DOMPurify from 'dompurify';
import 'katex/dist/katex.min.css';
@@ -281,7 +282,14 @@ const FloatingChatWidgetMarkdown = ({
<HoverCardTrigger asChild>
<InfoCircleOutlined className={styles.referenceIcon} />
</HoverCardTrigger>
- <HoverCardContent>{getPopoverContent(chunkIndex)}</HoverCardContent>
+ <HoverCardPrimitive.Portal>
+ <HoverCardContent
+ collisionPadding={8}
+ className="max-h-[var(--radix-hover-card-content-available-height)]"
+ >
+ {getPopoverContent(chunkIndex)}
+ </HoverCardContent>
+ </HoverCardPrimitive.Portal>
</HoverCard>
);
});