fix: error message on chat title edit
@@ -204,9 +204,10 @@
const chatTitleInputKeydownHandler = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
- editChatTitle(id, chatTitle);
- confirmEdit = false;
- chatTitle = '';
+ setTimeout(() => {
+ const input = document.getElementById(`chat-title-input-${id}`);
+ if (input) input.blur();
+ }, 0);
} else if (e.key === 'Escape') {
confirmEdit = false;