Skip to content

Commit

Permalink
fix(Dashboard): Prevent scroll when hovering filters (apache#28550)
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored May 16, 2024
1 parent aa2b060 commit 938a727
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}
`}
`;

Expand Down Expand Up @@ -160,7 +163,7 @@ export const FiltersBadge = ({ chartId }: FiltersBadgeProps) => {
useEffect(() => {
if (popoverVisible) {
setTimeout(() => {
popoverContentRef?.current?.focus();
popoverContentRef?.current?.focus({ preventScroll: true });
});
}
}, [popoverVisible]);
Expand Down

0 comments on commit 938a727

Please sign in to comment.