From 054e162c82389153df09237577a58008ab54b681 Mon Sep 17 00:00:00 2001 From: borimong Date: Sun, 27 Oct 2024 15:40:15 +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?= 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]);