mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-20 22:13:43 +00:00
UI: Fix chat sometimes not scrolling down after sending a message
This commit is contained in:
parent
c5814db173
commit
9e82f8c394
1 changed files with 6 additions and 1 deletions
|
|
@ -459,7 +459,12 @@ function updateCssProperties() {
|
|||
|
||||
// Adjust scrollTop based on input height change
|
||||
if (chatInputHeight !== currentChatInputHeight) {
|
||||
chatContainer.scrollTop += chatInputHeight - currentChatInputHeight;
|
||||
if (!isScrolled && chatInputHeight < currentChatInputHeight) {
|
||||
chatContainer.scrollTop = chatContainer.scrollHeight;
|
||||
} else {
|
||||
chatContainer.scrollTop += chatInputHeight - currentChatInputHeight;
|
||||
}
|
||||
|
||||
currentChatInputHeight = chatInputHeight;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue