Fix close and open conversation

This commit is contained in:
andrepimenta
2025-07-28 22:09:22 +01:00
parent 2c47349282
commit 2d63eaac58
2 changed files with 59 additions and 13 deletions

View File

@@ -1546,6 +1546,10 @@ const html = `<!DOCTYPE html>
messageInput.addEventListener('keydown', (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
const sendBtn = document.getElementById('sendBtn');
if (sendBtn.disabled){
return;
}
sendMessage();
} else if (e.key === '@' && !e.ctrlKey && !e.metaKey) {
// Don't prevent default, let @ be typed first