Skip to content

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

Fix: Switching from the dataset's "Files" page to the "Configuration" page results in the scrollbar not appearing at the top. (#20179)

balibabu313ca90f6abd
diff --git a/web/src/components/ui/popover.tsx b/web/src/components/ui/popover.tsx
index 9ec1057ca6..0edc9a88a3 100644
--- a/web/src/components/ui/popover.tsx
+++ b/web/src/components/ui/popover.tsx
@@ -15,7 +15,11 @@ const Popover = ({
onOpenChange,
disableOutsideClick = false,
}: PopoverProps) => {
- const [open, setOpen] = React.useState(true);
+ // Initialize from the prop instead of a hard-coded `true`: the latter
+ // renders every popover open for the first frame(s) until the effect syncs,
+ // and Radix's close sequence then steals focus to the trigger — scrolling
+ // any scrollable ancestor (e.g. the dataset configuration form) to it.
+ const [open, setOpen] = React.useState(!!openState);
React.useEffect(() => {
setOpen(!!openState);
}, [openState]);