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
- Open a chat.
- Open the message search interface.
- Switch to a Chinese Pinyin input method.
- 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.
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
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
masterTechnical context
The message search uses
SearchInputwithteactExperimentControlled. InprocessControlled, each input event can restorecurrentTarget.valuefrom the rendered controlledvalue. This also happens whileInputEvent.isComposingis true, so the DOM mutation disrupts the active IME composition. Controlled-value restoration should not modify the input value during composition.