mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Make more robust
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<div class="column is-one-fifth">
|
||||
<Sidebar bind:apiKey bind:sortedChats />
|
||||
</div>
|
||||
<div class="column is-four-fifths">
|
||||
<div class="column is-four-fifths" id="content">
|
||||
{#key $location}
|
||||
<Router {routes} />
|
||||
{/key}
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user