mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-03 15:20:01 +01:00
Scroll the textarea into view when editing a message
This commit is contained in:
parent
93b3752cdf
commit
9bd7359ffa
|
|
@ -95,6 +95,12 @@ function startEditing(messageElement, messageBody, isUserMessage) {
|
|||
editingInterface.textarea.focus();
|
||||
editingInterface.textarea.setSelectionRange(rawText.length, rawText.length);
|
||||
|
||||
// Scroll the textarea into view
|
||||
editingInterface.textarea.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
block: "center"
|
||||
});
|
||||
|
||||
// Setup event handlers
|
||||
setupEditingHandlers(editingInterface.textarea, messageElement, originalHTML, messageBody, isUserMessage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue