Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Add vertical scrolling support for floating elements. (#30897)

coopercodere8e386a6b9a3
diff --git a/web/app/components/base/portal-to-follow-elem/index.tsx b/web/app/components/base/portal-to-follow-elem/index.tsx
index a656ab53084..c57fba9dd07 100644
--- a/web/app/components/base/portal-to-follow-elem/index.tsx
+++ b/web/app/components/base/portal-to-follow-elem/index.tsx
@@ -61,9 +61,12 @@ export function usePortalToFollowElem({
}),
shift({ padding: 5 }),
size({
- apply({ rects, elements }) {
- if (triggerPopupSameWidth)
- elements.floating.style.width = `${rects.reference.width}px`
+ apply({ rects, elements, availableHeight }) {
+ Object.assign(elements.floating.style, {
+ maxHeight: `${Math.max(0, availableHeight)}px`,
+ overflowY: 'auto',
+ ...(triggerPopupSameWidth && { width: `${rects.reference.width}px` }),
+ })
},
}),
],