diff --git a/src/App.svelte b/src/App.svelte
index 5bcf594..58501e3 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -26,7 +26,7 @@
-
+
{#key $location}
{/key}
diff --git a/src/lib/Chat.svelte b/src/lib/Chat.svelte
index dfc5535..27dad4d 100644
--- a/src/lib/Chat.svelte
+++ b/src/lib/Chat.svelte
@@ -162,8 +162,7 @@
// Scroll to the bottom of the chat on update
afterUpdate(() => {
// Scroll to the bottom of the page after any updates to the messages array
- const chatWindow = document.getElementsByClassName('column is-four-fifths')[0]
- chatWindow.scrollIntoView({ behavior: 'smooth', block: 'end' })
+ document.querySelector('#content')?.scrollIntoView({ behavior: 'smooth', block: 'end' })
input.focus()
})