Skip to content

Chinese IME input not working in Unsloth Studio (WSL + Windows Chrome) #5546

Closed

Description

@wangteakwoo-wq

Environment

  • OS: Windows 11 + WSL Ubuntu
  • Browser: Google Chrome (Windows)
  • Unsloth Studio version: latest

Problem
Cannot input Chinese characters in the chat/input textarea when accessing
http://127.0.0.1:8888 from Windows Chrome.

Root Cause
The compositionend event never fires when using Windows IME through
Chrome accessing a WSL localhost service. Since the frontend relies on
isComposing / compositionend to confirm Chinese input, the text
gets discarded.

Verified via DevTools: compositionstart and compositionupdate fire
correctly, but compositionend never fires.

Workaround
Copy-paste Chinese text works. Direct typing does not.

Suggested Fix
Instead of relying solely on compositionend, use a self-maintained
composing variable with a fallback:
Track composition state manually and detect composition end by checking
if the input value contains CJK characters after an input event where
the previous state was composing.

Activity

  1. wangteakwoo-wq commented on May 18, 2026

    @wangteakwoo-wq
    Author

    Thank you for the incredibly fast fix! Really appreciate the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions