From c949a626b07540cbf324481d310b9842e6f8307e Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Tue, 25 Feb 2025 22:48:59 -0500
Subject: Don't scroll all the time as messages are added

Only once on load, then once per new message.
---
 ui/lib/components/Message.svelte | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index dacd900..edd9d79 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -1,10 +1,6 @@
 <script>
   import { DateTime } from 'luxon';
 
-  function scroll(message) {
-    message.scrollIntoView();
-  }
-
   let { id, at, body, renderedBody, editable = false, deleteMessage = async (id) => {} } = $props();
   let deleteArmed = $state(false);
   let atFormatted = $derived(at.toLocaleString(DateTime.DATETIME_SHORT));
@@ -31,7 +27,7 @@
       <button onclick={ondelete}>&#x1F5D1;&#xFE0F;</button>
     {/if}
   </div>
-  <section use:scroll class="message-body">
+  <section class="message-body">
     <!-- eslint-disable-next-line svelte/no-at-html-tags -->
     {@html renderedBody}
   </section>
-- 
cgit v1.2.3

