Chinese Pinyin input (IME) is interrupted in v1.6.5
Bug Description
My Chinese Pinyin input (IME) is interrupted
https://github.com/user-attachments/assets/1eb3aa36-1a5f-4088-a2b2-5bb7f93d257a
Reproduction
- Use Langflow v1.6.5.
- Set the operating system's input method to a Chinese Pinyin IME (Sogou Pinyin).
- Go to any flow and try to edit a text field (e.g., Text Input).
- Try to type any Chinese word, such as "nihao".
- Observe that after the first keystroke ("n"), the input is finalized, and the composition is broken.
Expected behavior
I hope to be able to input normally using a Chinese input method.
The text field should wait for the IME composition to complete (e.g., after I type "nihao" and press the spacebar) and then accept the final Chinese characters (e.g., "你好") without being interrupted.
Who can help?
No response
Operating System
Mac
Langflow Version
1.6.5
Python Version
None
Screenshot
No response
Flow File
No response
the behavior is the same when using other input method such as weType(WeChat)
Langflow’s frontend is built with React + TypeScript. According to the official React documentation, proper support for Chinese (and other IME-based) input requires handling composition events.
However, the input components provided by Langflow do not implement any IME-related composition event handling. I checked one of the input components, and its source code is essentially:
<input autoComplete="off" type={type} placeholder={placeholder} className={cn( "nopan nodelete nodrag noflow primary-input !placeholder-transparent", icon && "pl-9", icon ? inputClassName : className, )} ref={ref} {...props} />
Without handling onCompositionStart, onCompositionUpdate, and onCompositionEnd, Chinese input will be broken (characters appear duplicated or scattered).
To fix this issue, modifications must be made directly in these input components. This creates concerns for commercial use, because maintaining a fork or patching Langflow’s source code is not ideal for long-term production environments.
Hello everyone,
Thank you for reporting this bug and providing the reproduction steps.
I have created an internal ticket (LFOSS-3123) to investigate and fix the IME interruption issue for Chinese input.
We will keep you updated here.
Best regards!