From 68c17b16fedc7d05dab734031d4aaac84d209d16 Mon Sep 17 00:00:00 2001 From: HeagBoKaT Date: Fri, 29 May 2026 15:51:12 +0300 Subject: [PATCH] Fix avatar picker modal: use createPortal to escape animated parent --- client/src/pages/ProfilePage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/pages/ProfilePage.tsx b/client/src/pages/ProfilePage.tsx index e4c473e..1dd236d 100644 --- a/client/src/pages/ProfilePage.tsx +++ b/client/src/pages/ProfilePage.tsx @@ -1,4 +1,5 @@ import { useState, useRef, useCallback } from 'react'; +import { createPortal } from 'react-dom'; import { useParams, Link, useNavigate } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; import { useUserCats } from '@/hooks/useCats'; @@ -197,7 +198,7 @@ export default function ProfilePage() { {modalCatId && setModalCatId(null)} />} - {showAvatarPicker && ( + {showAvatarPicker && createPortal(
setShowAvatarPicker(false)}>
e.stopPropagation()}>
@@ -234,7 +235,8 @@ export default function ProfilePage() {
-
+ , + document.body )}