Skip to content

Commit be8121e

Browse files
committed
docs: update wording on comment for clarity
1 parent 4302b3d commit be8121e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/src/components/Popover/Popover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export const Popover: FC<PopoverProps> = (props) => {
6767
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
6868
const triggerRef: TriggerRef = useRef(null);
6969

70-
// This doesn't guarantee that we'll always close any popovers when the
71-
// user switches tabs when the component is being controlled, but this is
72-
// basically the most we can do from this component
70+
// Helps makes sure that popovers close properly when the user switches to
71+
// a different tab. This won't help with controlled instances of the
72+
// component, but this is basically the most we can do from here
7373
useEffect(() => {
7474
const closeOnTabSwitch = () => setUncontrolledOpen(false);
7575
window.addEventListener("blur", closeOnTabSwitch);

0 commit comments

Comments
 (0)