enh: title edit should auto focus to input

This commit is contained in:
Timothy Jaeryang Baek 2025-01-20 22:44:59 -08:00
parent a863f98c53
commit 006208f9a9

View File

@ -234,6 +234,7 @@
<input
use:focusEdit
bind:value={chatTitle}
id="chat-title-input-{id}"
class=" bg-transparent w-full outline-none mr-10"
/>
</div>
@ -362,10 +363,15 @@
archiveChatHandler={() => {
archiveChatHandler(id);
}}
renameHandler={() => {
renameHandler={async () => {
chatTitle = title;
confirmEdit = true;
await tick();
const input = document.getElementById(`chat-title-input-${id}`);
if (input) {
input.focus();
}
}}
deleteHandler={() => {
showDeleteConfirm = true;