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