diff --git a/src/components/right/ProfileInfo.tsx b/src/components/right/ProfileInfo.tsx index 43b3450d5..391ad267d 100644 --- a/src/components/right/ProfileInfo.tsx +++ b/src/components/right/ProfileInfo.tsx @@ -102,15 +102,12 @@ const PrivateChatInfo: FC = ({ // Support for swipe gestures and closing on click useEffect(() => { - const element = document.querySelector( - '.profile-slide-container > .active, .profile-slide-container > .to', - ); + const element = document.querySelector('.photo-wrapper'); if (!element) { return undefined; } return captureEvents(element, { - excludedClosestSelector: '.navigation', onSwipe: IS_TOUCH_ENV ? (e, direction) => { if (direction === SwipeDirection.Right) { selectPreviousMedia();