diff --git a/src/lib/components/Apps/components/Comments/index.svelte b/src/lib/components/Apps/components/Comments/index.svelte index 2abc02a1..ab5d3e90 100644 --- a/src/lib/components/Apps/components/Comments/index.svelte +++ b/src/lib/components/Apps/components/Comments/index.svelte @@ -50,11 +50,6 @@ }); comment = ''; - setTimeout(() => { - bodyRef.scrollTo({ - top: bodyRef.scrollHeight - }); - }, 100); } function handleKeyDown(e: KeyboardEvent) { @@ -98,6 +93,11 @@ } ]; $lesson.totalComments = comments.length; + setTimeout(() => { + bodyRef.scrollTo({ + top: bodyRef.scrollHeight + }); + }, 100); } async function fetchComments(people: GroupPerson[], lessonId?: string | null) { @@ -139,7 +139,6 @@ : lessonComment.groupmember.profile.fullname }; }); - // $lesson.totalComments = comments.length; } onMount(async () => { @@ -166,7 +165,7 @@ -