Skip to content

Fix: Prevent IME composition Enter from sending chat messages#395

Open
mats16 wants to merge 1 commit intodatabricks-solutions:mainfrom
mats16:fix/ime-enter-send-issue
Open

Fix: Prevent IME composition Enter from sending chat messages#395
mats16 wants to merge 1 commit intodatabricks-solutions:mainfrom
mats16:fix/ime-enter-send-issue

Conversation

@mats16
Copy link
Copy Markdown

@mats16 mats16 commented Mar 30, 2026

Summary

  • Fix an issue where pressing Enter to confirm IME (Input Method Editor) composition (e.g., Japanese, Chinese, Korean input) inadvertently sends the chat message
  • Add e.nativeEvent.isComposing check to handleKeyDown so that Enter during IME composition is ignored

Changes

  • databricks-builder-app/client/src/pages/ProjectPage.tsx — Add !e.nativeEvent.isComposing condition to the keyboard event handler

Test plan

  • Type with an IME (e.g., Japanese), press Enter to confirm conversion → message should NOT be sent
  • Without IME active, press Enter → message should be sent as before
  • Shift+Enter → should insert a newline as before

Updated the handleKeyDown function to prevent message sending when the Enter key is pressed during composition (e.g., while typing in an input method). This change improves user experience by avoiding unintended message submissions during text composition.
@mats16 mats16 marked this pull request as ready for review March 30, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant