mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 06:35:15 +00:00
UI: Focus on the chat input after starting a new chat
This commit is contained in:
parent
168a0f4f67
commit
1bdceea2d4
3 changed files with 17 additions and 5 deletions
10
js/main.js
10
js/main.js
|
|
@ -473,3 +473,13 @@ respondToRenameVisibility(renameTextArea, handleVisibilityChange);
|
|||
if (document.getElementById('extensions') === null) {
|
||||
document.getElementById("chat-tab").style.marginBottom = "-29px";
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// Focus on the chat input after starting a new chat
|
||||
//------------------------------------------------
|
||||
|
||||
document.querySelectorAll('.focus-on-chat-input').forEach(element => {
|
||||
element.addEventListener('click', function() {
|
||||
document.querySelector('#chat-input textarea').focus();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue