UI: Focus on the chat input after starting a new chat

This commit is contained in:
oobabooga 2024-04-06 12:57:57 -07:00
parent 168a0f4f67
commit 1bdceea2d4
3 changed files with 17 additions and 5 deletions

View file

@ -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();
});
});