Skip to content

Search: Preserve IME composition in controlled inputs - #534

Open
aioya wants to merge 1 commit into
Ajaxy:masterfrom
aioya:fix/message-search-ime-composition
Open

Search: Preserve IME composition in controlled inputs#534
aioya wants to merge 1 commit into
Ajaxy:masterfrom
aioya:fix/message-search-ime-composition

Conversation

@aioya

@aioya aioya commented Aug 4, 2026

Copy link
Copy Markdown

Problem

The chat message search uses an experimental controlled input. During Chinese IME composition, each intermediate input event can restore the DOM value from the previous rendered value. This interrupts the active composition and leaves partial Latin letters before a candidate can be selected.

Fix

Treat the delegated input event as an InputEvent and skip controlled-value restoration while isComposing is true. Input callbacks still run during composition, and normal controlled-value restoration resumes after the IME commits or cancels the composition.

This is implemented in the shared controlled-input layer so other IME-backed controlled inputs receive the same behavior.

Checks

  • ./node_modules/.bin/tsc --pretty false
  • npx eslint src/lib/teact/teact-dom.ts
  • git diff --check

Closes #533

@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

👷 Deploy request for telegram-tt-previews pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d6688af

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.

Chat message search interrupts Chinese IME composition

1 participant