Skip to content

Fix IME Enter submitting chat messages on macOS#528

Open
Y1fe1Zh0u wants to merge 1 commit intodataelement:mainfrom
Y1fe1Zh0u:fix/524-macos-ime-enter-submit
Open

Fix IME Enter submitting chat messages on macOS#528
Y1fe1Zh0u wants to merge 1 commit intodataelement:mainfrom
Y1fe1Zh0u:fix/524-macos-ime-enter-submit

Conversation

@Y1fe1Zh0u
Copy link
Copy Markdown
Collaborator

Summary

  • prevent Enter keydown events used by IME candidate confirmation from sending chat messages
  • apply the guard to both chat entry points while preserving Enter-to-send and Shift+Enter newline behavior

Testing

  • npm run build

Closes #524

macOS Chinese IMEs can emit Enter keydown events while committing a candidate. The chat inputs already checked isComposing, but browser composition boundary timing can still surface IME-processed keydown events with keyCode 229, so both chat send handlers now keep those events out of the submit path.

Constraint: Preserve existing Enter-to-send and Shift+Enter newline behavior

Rejected: Switch sending to Cmd+Enter | broader UX change than the issue requires

Confidence: high

Scope-risk: narrow

Directive: Keep IME guards on every keyboard shortcut that submits user-entered text

Tested: npm run build

Not-tested: Manual macOS Chinese IME browser reproduction
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.

Pressing Enter to confirm IME candidate word on macOS triggers message send simultaneously

1 participant