feat: chat input focus on new chat

This commit is contained in:
Timothy J. Baek 2024-02-27 19:56:52 -08:00
parent 1d4d1ddbea
commit 260a8b8b83
4 changed files with 16 additions and 8 deletions

View file

@ -134,6 +134,9 @@
settings.set({
..._settings
});
const chatInput = document.getElementById('chat-textarea');
setTimeout(() => chatInput?.focus(), 0);
};
const scrollToBottom = () => {

View file

@ -99,6 +99,9 @@
if (await loadChat()) {
await tick();
loaded = true;
const chatInput = document.getElementById('chat-textarea');
chatInput?.focus();
} else {
await goto('/');
}