diff --git a/superset-frontend/src/components/DropdownContainer/index.tsx b/superset-frontend/src/components/DropdownContainer/index.tsx index 2d0e3af1d6fcf..92a2ff82e74a9 100644 --- a/superset-frontend/src/components/DropdownContainer/index.tsx +++ b/superset-frontend/src/components/DropdownContainer/index.tsx @@ -272,6 +272,16 @@ const DropdownContainer = forwardRef( [ref], ); + // Closes the popover when scrolling on the document + useEffect(() => { + document.onscroll = popoverVisible + ? () => setPopoverVisible(false) + : null; + return () => { + document.onscroll = null; + }; + }, [popoverVisible]); + return (