Skip to content

Chat message search interrupts Chinese IME composition #533

Description

@aioya

Summary

The chat message search input cannot reliably accept text entered with a Chinese IME. While the user is composing a candidate, the intermediate Pinyin text is reset to an earlier value, which interrupts the composition and leaves partial Latin letters in the input.

Steps to reproduce

  1. Open a chat.
  2. Open the message search interface.
  3. Switch to a Chinese Pinyin input method.
  4. Type a multi-letter Pinyin sequence and keep it in the candidate/composition state.

Actual behavior

The composition text is interrupted while typing. The pending Pinyin sequence is truncated or replaced by partial Latin letters before a Chinese candidate can be selected.

Expected behavior

The search input preserves the full composition text until the IME commits or cancels it, allowing the user to select a Chinese candidate normally.

Environment

  • Telegram Web A: 12.0.37 / current master
  • OS: macOS
  • Input method: Chinese Pinyin IME

Technical context

The message search uses SearchInput with teactExperimentControlled. In processControlled, each input event can restore currentTarget.value from the rendered controlled value. This also happens while InputEvent.isComposing is true, so the DOM mutation disrupts the active IME composition. Controlled-value restoration should not modify the input value during composition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions