langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Chinese Pinyin input (IME) is interrupted in v1.6.5

Open best-xallen opened this issue 1 year ago • 3 comments

Bug Description

My Chinese Pinyin input (IME) is interrupted

https://github.com/user-attachments/assets/1eb3aa36-1a5f-4088-a2b2-5bb7f93d257a

Reproduction

  1. Use Langflow v1.6.5.
  2. Set the operating system's input method to a Chinese Pinyin IME (Sogou Pinyin).
  3. Go to any flow and try to edit a text field (e.g., Text Input).
  4. Try to type any Chinese word, such as "nihao".
  5. 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

best-xallen avatar Nov 03 '25 07:11 best-xallen

the behavior is the same when using other input method such as weType(WeChat)

likaisoft avatar Nov 07 '25 03:11 likaisoft

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.

748561321 avatar Nov 21 '25 05:11 748561321

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!

AntonioABLima avatar Dec 20 '25 17:12 AntonioABLima