From d560c8898973ff3587bce638e82fe4c0feeb523c Mon Sep 17 00:00:00 2001 From: Linda Eskilsson Date: Fri, 24 Apr 2026 17:12:16 +0200 Subject: [PATCH 1/2] fix: remove auto-scroll on journal open --- frontend/src/pages/CaseDetail.jsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/frontend/src/pages/CaseDetail.jsx b/frontend/src/pages/CaseDetail.jsx index 1d6c05e..c8f4c2e 100644 --- a/frontend/src/pages/CaseDetail.jsx +++ b/frontend/src/pages/CaseDetail.jsx @@ -17,7 +17,6 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi const [editedDescription, setEditedDescription] = useState(caseData?.description || ''); const [editedTitle, setEditedTitle] = useState(caseData?.title || ''); - const messagesEndRef = useRef(null); const statusConfig = STATUS_MAP[localStatus] || { label: localStatus, color: 'bg-slate-50 text-slate-500 border-slate-100' }; const isClosed = localStatus === 'CLOSED'; // Helper för att förenkla checkar @@ -65,14 +64,6 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi } }, [caseData?.id]); - const scrollToBottom = () => { - messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); - }; - - useEffect(() => { - if (timeline.length > 0) scrollToBottom(); - }, [timeline]); - useEffect(() => { const fetchAllData = async () => { if (!caseData?.id) return; @@ -224,7 +215,7 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi if (!caseData || loading) return
Laddar journal...
; return ( -
+
{/* NAVIGATION */}
))} -
From 4e091271ac66f819001416ccaf25395800d488e4 Mon Sep 17 00:00:00 2001 From: Linda Eskilsson Date: Fri, 24 Apr 2026 17:12:41 +0200 Subject: [PATCH 2/2] fix: remove auto-scroll on journal open --- frontend/src/pages/CaseDetail.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/pages/CaseDetail.jsx b/frontend/src/pages/CaseDetail.jsx index c8f4c2e..ec6a46e 100644 --- a/frontend/src/pages/CaseDetail.jsx +++ b/frontend/src/pages/CaseDetail.jsx @@ -447,7 +447,6 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi - {/* CLOSE CASE MODAL */} {showCloseModal && (