diff --git a/src/stories/AnchoredOverlay.stories.tsx b/src/stories/AnchoredOverlay.stories.tsx index 1d7c1da8fc1..0bb3e5f512f 100644 --- a/src/stories/AnchoredOverlay.stories.tsx +++ b/src/stories/AnchoredOverlay.stories.tsx @@ -1,7 +1,7 @@ import React, {useEffect, useRef, useState} from 'react' import {Meta} from '@storybook/react' -import {BaseStyles, Box, ThemeProvider} from '..' +import {BaseStyles, Box, ThemeProvider, Button} from '..' import Heading from '../Heading' import DropdownButton from '../deprecated/Button' import {AnchoredOverlay} from '../AnchoredOverlay' @@ -115,3 +115,25 @@ export const PortalInsideScrollingElement = () => { ) } + +// repro for https://github.com/primer/react/issues/2184 +export function ScrollTest(): JSX.Element { + const [isOpen, setIsOpen] = useState(false) + + return ( + <> +
+
+ } + open={isOpen} + onOpen={() => setIsOpen(true)} + onClose={() => setIsOpen(false)} + > + Anchored Content + +
+
+ + ) +}