diff --git a/wwwroot/css/base.css b/wwwroot/css/base.css index e0ec0fd..fbb25f2 100644 --- a/wwwroot/css/base.css +++ b/wwwroot/css/base.css @@ -18,7 +18,7 @@ body { flex-direction: column; } -body, button, input, select, textarea { +body, button, input, select, textarea, #input { font-family: var(--font); color: var(--text); } @@ -27,7 +27,7 @@ body { font-size: var(--font-size); } -button, input, select, textarea, h1, h2, h3, h4, h5 { +button, input, select, textarea, #input, h1, h2, h3, h4, h5 { font-size: 1em; } diff --git a/wwwroot/js/pages/chat-page.js b/wwwroot/js/pages/chat-page.js index cfd40ed..b826bd5 100644 --- a/wwwroot/js/pages/chat-page.js +++ b/wwwroot/js/pages/chat-page.js @@ -60,11 +60,13 @@ registerPage('chat', { const sendBtn = document.getElementById('send'); if (sendBtn) sendBtn.addEventListener('click', sendMessage); - // Ctrl+Enter const inputEl = document.getElementById('input'); if (inputEl) { inputEl.addEventListener('keydown', (e) => { - if (e.ctrlKey && e.key === 'Enter') sendMessage(); + if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { + e.preventDefault(); + sendMessage(); + } }); inputEl.addEventListener('input', function () { this.style.height = 'auto';