diff --git a/ts/components/fun/base/FunPopover.tsx b/ts/components/fun/base/FunPopover.tsx index a3d6f7fdb1..9a454bf1c6 100644 --- a/ts/components/fun/base/FunPopover.tsx +++ b/ts/components/fun/base/FunPopover.tsx @@ -1,6 +1,6 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ReactNode } from 'react'; +import type { KeyboardEvent, ReactNode } from 'react'; import React, { useCallback } from 'react'; import type { Placement } from 'react-aria'; import { Dialog, Popover } from 'react-aria-components'; @@ -33,19 +33,27 @@ export function FunPopover(props: FunPopoverProps): JSX.Element { [] ); + const handleKeyDown = useCallback((event: KeyboardEvent) => { + event.stopPropagation(); + }, []); + return ( - - {props.children} - + {/* Prevents keyboard events from bubbling up outside of the popover */} + {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */} +
+ + {props.children} + +
); }