Skip to content

[Bug]: 搜狗输入法在终端组合态切换英文时,已提交的文本被静默丢弃 #22589

Description

@wenpingzhou

Operating system

Windows

Orca version

No response

Details

搜狗输入法在终端组合态切换英文时,已提交的文本被静默丢弃

组合态下按 Shift(或 Ctrl+Space)切英文,字母完全不上屏。运行时埋点定位到 vendored xterm 的 Terminal._inputEvent:该时序下两条投递通道同时关闭。

环境

项 | 值 -- | -- Orca | 1.4.209(Windows) OS | Windows 10 Pro 19045 内核 | Chromium 150.0.7871.250(Electron) 输入法 | 搜狗输入法(复现)/ 微软拼音(对照,正常) 对照终端 | Windows Terminal、VS Code 终端(均正常)

事件序列交叉核对:整轮只产生 4 条 insertText 事件,两两成对(beforeinput + input),对应两次独立的用户操作 —— 没有重复投递。

尚未解释 / 证据边界

  • 为什么搜狗在 Orca 渲染进程里不产生 composition 事件,而在同等条件的普通浏览器 <textarea> 里会产生完整组合生命周期。这层成因尚未查明(可能与 xterm 隐藏 textarea 的 IME 行为有关),但丢字的判定链不依赖它。

  • 埋点按 class 过滤 .xterm-helper-textarea,字母键的 keydown 一条都没捕获到(keyup 却正常)。这不影响结论(只要切换键的 keydown 置位了 _keyDownSeen,通道 2 就已关闭),但不能排除有事件在到达 window 之前被吞。

  • Orca chat 输入框的丢字走另一条路径,本次未定位、未修复。

相关

Activity

  1. added theissue type on Sep 24, 2026
  2. nwparker commented on Sep 24, 2026

    @nwparker
    Contributor

    This is the same defect as #22021, and your trace is the better-evidenced report of the two — thank you for the runtime instrumentation, especially the observation that Sogou produces no composition events in Orca's renderer at all while a plain browser <textarea> gets the full lifecycle. That is the part the existing guards all assume.

    @JasonJarvan has a fix in flight at #22026 for exactly this path (Windows, Electron TUI, Shift-to-English commit dropped). I have just left a review on it with two blockers, so it is not merged yet.

    Tracking this one as the duplicate and keeping #22021 as the primary — but I am leaving it open rather than closing, because two things you raised are not covered by #22026 and I do not want them lost:

    1. The chat input box. You note the drop there goes through a different path and is unfixed. That is correct and it is a separate issue; fix(terminal): commit Sogou Shift latin in the Electron TUI #22026 only touches the terminal.
    2. Why Sogou emits no composition events in the renderer. Still unexplained, and it is the shared root cause behind the Linux reports too ([Bug]: Sogou Pinyin Input Issue in Codex on Ubuntu 20.04 #22442, Chinese IME: single character not displayed during composition #16260, Chinese IME input not shown after quit-agent -> restart-Orca sequence (works when Orca killed while agent running) #19180) — I have a Linux-side fix up at fix(terminal): let Linux IMEs keep the candidate key for a preedit they own #22607 that works around it rather than explaining it.

    Related: Discussion #12995 that you referenced was indeed waiting for a Shift-toggle report; this is it.

  3. JasonJarvan commented on Sep 24, 2026

    @JasonJarvan

    The terminal half of this report is the same defect as #22021. The review on #22026 asked for a narrower Windows keydown carve-out; that is now on the branch (30c05ec). Leaving this issue open for the two items that PR does not cover: the chat input box, and why Sogou emits no composition events in the renderer.

  4. wenpingzhou commented on Sep 24, 2026

    @wenpingzhou
    Author

    我按照AI给的修复方案,验证已经正常,期望下一个版本更新能修复这个问题
    orca-sogou-ime-bug-report.md

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

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions