You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
焦点落在对话输入框时,Windows IME 与该 textarea 没有正确挂接:候选框不弹出,中文按键被吞掉,只有英文能进。故障是间歇性的,取决于这次聚焦是用户点击还是应用程序化重聚焦。关键指纹:外部粘贴一段中文后 IME 立刻恢复可用 —— 粘贴是一次真实用户手势 + 一次 input 事件,会重建 IME 挂接,而之前那次聚焦没有建立起来。实际影响:每次想写中文都必须在别处打好字再复制粘贴。
Screenshots, recordings, or sanitized logs
版本:Command Code Desktop 0.1.55 / Windows 11 / zh-CN / Microsoft 拼音。Session id: 5ec5254a-700f-40a5-867b-89d1335d3f84
Still reproducible on 0.1.60 and 0.1.61 — this is not fixed.
Environment: Windows 10 (zh-CN), Command Code Desktop 0.1.60 and 0.1.61,
installed via the Windows installer.
I tested two different IMEs locally, same machine, same result:
Microsoft Pinyin (built in)
Weasel / Rime (小狼毫)
In both cases the chat composer loses IME input intermittently: sometimes
Chinese types normally, sometimes focusing the composer and typing produces no
candidate window at all — keystrokes are swallowed and only ASCII gets through.
It is not consistently broken, and it is not specific to Microsoft Pinyin. When
it is broken, pasting a Chinese string from another app almost always restores
IME input in the same textarea, so the element itself is fine — it is the IME
attachment that failed to get established for that particular focus.
Since two unrelated IMEs (one from Microsoft, one TSF-based third party) fail
the same way while working normally in Notepad and browsers on the same machine,
this looks like an app-side issue rather than an IME integration problem.
The release notes for 0.1.61 have no IME / composition entry, and the p1 label
is still on this issue, so I assume it has not been worked on yet. Filing this
to confirm it is not a single-version regression and to add the version range.
Because it is intermittent, the trigger is probably a race rather than a missing
code path. One hypothesis worth checking: the failure may correlate with how
the composer got focus rather than with the composer state. If a direct click
into the textarea behaves differently from a programmatically restored focus
(slash-command palette closing, attachment picker closing, prompt-history recall,
mount useEffect), that points straight at the restoreFocus / focusAtEnd path
described in the original report. focus() followed by setSelectionRange()
inside requestAnimationFrame is a known way to detach the Windows IME from a
Chromium text input, and it would explain why only a real user gesture
re-attaches it. A cheap mitigation would be to skip the refocus + selection reset
while isComposing is true, or to avoid calling setSelectionRange when the
selection is already at the end.
Activity
becausemadoka commentedon Nov 11, 2026
0.1.60 和 0.1.61 上仍然可以复现,这个问题没有修好。
环境:Windows 10(zh-CN),Command Code Desktop 0.1.60 / 0.1.61,用 Windows 安装包安装。
我在本机测了两个不同的输入法,结果一致:
两者都表现为对话输入框的输入法间歇性失效:有时中文能正常输入;有时聚焦输入框后打字,候选框根本不弹出,按键被吞掉,只有 ASCII 能进去。不是稳定复现的坏,也不是只有微软拼音有问题。失效时,从其他程序粘贴一段中文进同一个 textarea,几乎总能立刻恢复输入法——说明输入框本身没问题,是那一次聚焦没有把 IME 挂接建立起来。
两个互不相关的输入法(一个微软自带,一个基于 TSF 的第三方)表现完全一样,而同一台机器上记事本和浏览器都正常,所以这更像是应用侧的问题,而不是某个输入法的兼容性问题。
0.1.61 的 release notes 里没有任何 IME / 组合输入相关条目,这个 issue 的 p1 标签也还在,所以我理解它还没被处理。发这条是为了确认这不是单一版本的回归,并补上版本范围。
因为是间歇性的,触发点更可能是一个竞态,而不是某条代码路径缺失。一个值得验证的假设:失效可能与输入框如何获得焦点有关,而不是与输入框状态有关。如果直接点击 textarea 与程序化恢复焦点(斜杠命令面板关闭、附件选择器关闭、提示词历史回溯、挂载时的 useEffect)表现不同,那就直接指向原报告里提到的
restoreFocus/focusAtEnd路径。在requestAnimationFrame里先focus()再setSelectionRange(),是 Chromium 上摘掉 Windows IME 挂接的已知方式,也能解释为什么只有真实用户手势才能把它重新挂上。成本较低的缓解方式:isComposing为 true 时跳过重聚焦和选区重置,或者在选区已经在末尾时不要调用setSelectionRange。如果需要,我可以帮忙测构建版本。
Still reproducible on 0.1.60 and 0.1.61 — this is not fixed.
Environment: Windows 10 (zh-CN), Command Code Desktop 0.1.60 and 0.1.61,
installed via the Windows installer.
I tested two different IMEs locally, same machine, same result:
In both cases the chat composer loses IME input intermittently: sometimes
Chinese types normally, sometimes focusing the composer and typing produces no
candidate window at all — keystrokes are swallowed and only ASCII gets through.
It is not consistently broken, and it is not specific to Microsoft Pinyin. When
it is broken, pasting a Chinese string from another app almost always restores
IME input in the same textarea, so the element itself is fine — it is the IME
attachment that failed to get established for that particular focus.
Since two unrelated IMEs (one from Microsoft, one TSF-based third party) fail
the same way while working normally in Notepad and browsers on the same machine,
this looks like an app-side issue rather than an IME integration problem.
The release notes for 0.1.61 have no IME / composition entry, and the p1 label
is still on this issue, so I assume it has not been worked on yet. Filing this
to confirm it is not a single-version regression and to add the version range.
Because it is intermittent, the trigger is probably a race rather than a missing
code path. One hypothesis worth checking: the failure may correlate with how
the composer got focus rather than with the composer state. If a direct click
into the textarea behaves differently from a programmatically restored focus
(slash-command palette closing, attachment picker closing, prompt-history recall,
mount useEffect), that points straight at the
restoreFocus/focusAtEndpathdescribed in the original report.
focus()followed bysetSelectionRange()inside
requestAnimationFrameis a known way to detach the Windows IME from aChromium text input, and it would explain why only a real user gesture
re-attaches it. A cheap mitigation would be to skip the refocus + selection reset
while
isComposingis true, or to avoid callingsetSelectionRangewhen theselection is already at the end.
Happy to test a build if that is useful.