SimpleChat:JS: bottom of element visible, Set focus to user input
As the generated text could be multiple lines and occupy more space that the full scrollable div's vertical space, make the bottom of the last element (which can be such a generated text) in the div visible by scrolling. Ensure that the user input box has focus
This commit is contained in:
parent
a944ce7cbe
commit
6eb1e0fbde
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,7 @@ class SimpleChat {
|
|||
last = entry;
|
||||
}
|
||||
if (last !== undefined) {
|
||||
last.scrollIntoView(true);
|
||||
last.scrollIntoView(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,7 @@ async function handle_submit(inputSystem, inputUser, divChat, apiEP) {
|
|||
if ((apiEP == ApiEP.Completion) && (gbCompletionFreshChatAlways)) {
|
||||
gChat.xchat.length = 0;
|
||||
}
|
||||
inputUser.focus();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue