-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Describe the bug
There is a critical input bug in the embedded assistant's text area when using an IME (Input Method Editor), such as Chinese Pinyin. When the text being typed becomes long enough to cause the input area to expand and wrap to a new line, the active IME composition is immediately and incorrectly finalized.
This breaks the user's typing flow mid-word, as demonstrated in the attached screenshot where the composition zheng'zai
was force-committed.

To Reproduce
Steps to reproduce the behavior:
- Use a system with a Chinese Pinyin IME enabled.
- Navigate to the embedded "Coco" assistant and click into the input text area.
- Type a continuous sentence in Chinese. For example, start typing the sentence shown in the screenshot:
如果用拼音输入法,输入的内容刚好触发换行,就会导致...
- Continue typing the next word, for instance,
zhengzai
(for正在
). - As you type these characters, the text will eventually exceed the width of the input box, forcing a line wrap.
- Observe: The moment the line wraps, the IME composition for
zhengzai
is prematurely committed as plain text, preventing the user from finishing the word or selecting from a list of candidates.
Expected behavior
The input box should resize vertically to accommodate the new line of text, while the IME composition string (e.g., the underlined zhengzai
) remains active. The user should be able to continue typing their word or phrase without interruption.
Actual behavior
As shown in the screenshot, the moment the text wraps, the active IME composition is finalized. The partially typed pinyin zheng'zai
is inserted as plain text, and the composition session is terminated. The user is forced to delete the incorrect text and re-type the word.
Screenshot
The following screenshot perfectly illustrates the issue. The text has just wrapped, and the composition for zheng'zai
has been incorrectly committed.
(You can embed your image here in GitHub)
Environment (please complete the following information):
- OS: [Windows 11]
- Browser: [Firefox]
- Input Method Editor (IME): [Microsoft Pinyin, Wechat IME]