mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
UI: Fix chat sometimes not scrolling down after sending a message
This commit is contained in:
parent
c5814db173
commit
9e82f8c394
@ -459,7 +459,12 @@ function updateCssProperties() {
|
|||||||
|
|
||||||
// Adjust scrollTop based on input height change
|
// Adjust scrollTop based on input height change
|
||||||
if (chatInputHeight !== currentChatInputHeight) {
|
if (chatInputHeight !== currentChatInputHeight) {
|
||||||
chatContainer.scrollTop += chatInputHeight - currentChatInputHeight;
|
if (!isScrolled && chatInputHeight < currentChatInputHeight) {
|
||||||
|
chatContainer.scrollTop = chatContainer.scrollHeight;
|
||||||
|
} else {
|
||||||
|
chatContainer.scrollTop += chatInputHeight - currentChatInputHeight;
|
||||||
|
}
|
||||||
|
|
||||||
currentChatInputHeight = chatInputHeight;
|
currentChatInputHeight = chatInputHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user