This is an automated email from the ASF dual-hosted git repository. diegopucci pushed a commit to branch geido/fix/dashboard-filter-scroll-up in repository https://gitbox.apache.org/repos/asf/superset.git
commit fbdc0bc8b7b1819ab05d920bf5d18af6021057b9 Author: Diego Pucci <[email protected]> AuthorDate: Thu May 16 14:43:39 2024 +0300 Prevent scroll --- superset-frontend/src/dashboard/components/FiltersBadge/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx index 3f771740a5..b10a533257 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx @@ -73,6 +73,9 @@ const StyledFilterCount = styled.div` .incompatible-count { font-size: ${theme.typography.sizes.s}px; } + &:focus-visible { + outline: 2px solid ${theme.colors.primary.dark2}; + } `} `; @@ -160,7 +163,7 @@ export const FiltersBadge = ({ chartId }: FiltersBadgeProps) => { useEffect(() => { if (popoverVisible) { setTimeout(() => { - popoverContentRef?.current?.focus(); + popoverContentRef?.current?.focus({ preventScroll: true }); }); } }, [popoverVisible]);
