Chat: Fix context menu overflow on iOS (#2396)

This commit is contained in:
Alexander Zinchuk 2023-01-28 02:16:15 +01:00
parent 55a9715bca
commit 4ad62ae62c

View File

@ -104,8 +104,9 @@ const ListItem: FC<OwnProps> = ({
);
const getMenuElement = useCallback(
() => containerRef.current!.querySelector('.ListItem-context-menu .bubble'),
[],
() => (withPortalForMenu ? document.querySelector('#portals') : containerRef.current)!
.querySelector('.ListItem-context-menu .bubble'),
[withPortalForMenu],
);
const getLayout = useCallback(