Repository navigation
[Bug]: 搜狗输入法在终端组合态切换英文时,已提交的文本被静默丢弃 #22589
Description
Activity
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:
- 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.
- 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.
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.
我按照AI给的修复方案,验证已经正常,期望下一个版本更新能修复这个问题
orca-sogou-ime-bug-report.md
Operating system
Windows
Orca version
No response
Details
搜狗输入法在终端组合态切换英文时,已提交的文本被静默丢弃
环境
项 | 值 -- | -- 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 输入框的丢字走另一条路径,本次未定位、未修复。
相关
Discussion Chinese IME: does switching to English SEND the in-progress text, or just commit it? #12995 —— 至今未获回答,维护者在该讨论中明确在等「使用 Shift 切换」这一类反馈,本报告即为该路径的实测结果
PR Fix ime input switch #7102 / fix(shortcuts): preserve native input-source switching #8305 / fix(terminal): keep the key that commits an IME composition #12313 / fix(terminal): deliver an IME commit the deferred textarea diff missed #15198