diff --git a/static/app.js b/static/app.js index 2764b90..a848193 100644 --- a/static/app.js +++ b/static/app.js @@ -3160,7 +3160,7 @@ function initializeEventListeners() { setTimeout(() => uiModule.autoResize(textarea), 1); }); textarea.addEventListener('keydown', (e) => { - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { // If ghost autocomplete is active, accept the suggestion instead of submitting if (window._ghostAutocomplete && window._ghostAutocomplete.isActive()) { e.preventDefault(); @@ -3733,7 +3733,7 @@ function startOdysseusApp() { // Enter to send (shift+enter for newline), or new chat when empty if (messageInput) { messageInput.addEventListener('keydown', (e) => { - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { e.preventDefault(); // Flush the debounced icon update so dataset.mode reflects the current // text state. Without this, a fast type-and-Enter would still see the diff --git a/static/js/chat.js b/static/js/chat.js index cde0e6e..10f7e05 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -3424,7 +3424,7 @@ import createResearchSynapse from './researchSynapse.js'; // Also submit on Enter (without shift) editor.addEventListener('keydown', (e) => { - if (e.key === 'Enter' && !e.shiftKey) { + if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { e.preventDefault(); saveBtn.click(); }