From 20a02a52545491cce55669b1b9c2f8270fbca3f9 Mon Sep 17 00:00:00 2001 From: Hyeonsu Kim <86764406+borimong@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:56:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9B=B9=EB=B7=B0=20=ED=94=BC=EB=93=9C?= =?UTF-8?q?=20=EC=9E=91=EC=84=B1=20remainingHeight=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?(#939)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/feed/Modal/FeedFormPresentation.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/feed/Modal/FeedFormPresentation.tsx b/src/components/feed/Modal/FeedFormPresentation.tsx index 473cb5a0..187dcaa9 100644 --- a/src/components/feed/Modal/FeedFormPresentation.tsx +++ b/src/components/feed/Modal/FeedFormPresentation.tsx @@ -59,6 +59,12 @@ function FeedFormPresentation({ const textAreaRef = useRef(null); const [remainingHeight, setRemainingHeight] = useState(100); const [selectedMeeting, setSelectedMeeting] = useState(undefined); + const [isMobileDevice, setIsMobileDevice] = useState(false); + const userAgent = navigator.userAgent; + + if (/android/i.test(userAgent) || /iPad|iPhone|iPod/.test(userAgent)) { + setIsMobileDevice(true); + } const handleWindowResize = () => { setTextareaHeightChangeFlag(flag => !flag); @@ -85,7 +91,7 @@ function FeedFormPresentation({ ); const availableHeight = window.innerHeight - allComponentHeights - BasicPadding; - setRemainingHeight(availableHeight); + setRemainingHeight(isMobileDevice ? availableHeight - 44 : availableHeight); } }, [textareaHeightChangeFlag]);