Skip to content

web: first keystroke swallowed in the empty composer after clicking the placeholder (IME most affected) #3313

Description

@kimi-agent-bot

Symptom

Since 0.39.0, typing into the empty composer in the web UI silently swallows the first keystroke — most visibly with an IME (Rime / WeChat IME on Windows 11 + Chrome): the first character of a composition never lands, typing only works from the second character on. Stable repro for affected users; 0.38.0 is unaffected.

Root cause

The web UI is synced from kimi-code-app. Between the 0.38.0 sync (code-app 6c99acc2) and the 0.39.0 sync (code-app 758f4587):

Chromium places the DOM caret by geometry, so clicking an empty composer (the placeholder text spans the whole input line) parks the DOM selection inside the widget's text nodes. pointer-events: none does not prevent this. ProseMirror maps "inside the widget" and "before the widget" to the same document position, so it never repairs the selection — but the browser editing engine rejects input aimed inside the non-editable widget, silently dropping keystrokes and IME composition insertions until something else moves the caret.

Fix

Fixed in kimi-code-app PR #429 (merged): a caret watchdog in the composer editor snaps the DOM caret out of the placeholder widget the moment it lands inside. This issue tracks bringing the fix into the CLI web bundle via a dist sync.

Activity

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