From b506df1fead16a3b5c284c1e016d4bc1499ebbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Gierwia=C5=82o?= Date: Tue, 9 Dec 2025 18:55:48 +0100 Subject: [PATCH] fix(chat): prevent page scroll on mobile when sending/receiving messages --- frontend/src/pages/EventChatPage.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/EventChatPage.jsx b/frontend/src/pages/EventChatPage.jsx index 5ede7d5..11f0553 100644 --- a/frontend/src/pages/EventChatPage.jsx +++ b/frontend/src/pages/EventChatPage.jsx @@ -77,7 +77,9 @@ const EventChatPage = () => { }, [searchParams]); const scrollToBottom = () => { - messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); + if (messagesContainerRef.current) { + messagesContainerRef.current.scrollTop = messagesContainerRef.current.scrollHeight; + } }; // Fetch event data and check participation