fix(chat): prevent page scroll on mobile when sending/receiving messages

This commit is contained in:
Radosław Gierwiało
2025-12-09 18:55:48 +01:00
parent 3195ce3450
commit b506df1fea

View File

@@ -77,7 +77,9 @@ const EventChatPage = () => {
}, [searchParams]); }, [searchParams]);
const scrollToBottom = () => { const scrollToBottom = () => {
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); if (messagesContainerRef.current) {
messagesContainerRef.current.scrollTop = messagesContainerRef.current.scrollHeight;
}
}; };
// Fetch event data and check participation // Fetch event data and check participation