[Bug]: Dead-key apostrophe inserts extra quotes in the composer
维护者通常 1 天内回复
@JohnnyBill 已经在做这个了。
开始于 2026年10月16日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 composer 编辑器的 handleTextInput 开始(该组件是 ComposerPromptEditorTiptap,位于 apps/web),目前任何非空的替换范围都被视为选中的文本并用分隔符包裹。修复方式是区分临时的 dead-key 替换与真正的选中文本 —— 在包裹之前检查编辑器的选择是否为空。基于那个挂载 ComposerPromptEditorTiptap 并重放替换的聚焦 jsdom 测试来构建,断言在 plain 和 rich-text 两种模式下先出现 s' 再出现 s'il,并确认现有的 composer 测试仍然通过。
由索引模型根据 Issue 内容生成。
描述
Area
apps/web, including the Linux desktop composer.
Steps to reproduce
- Use a keyboard layout where the apostrophe key is a dead key for accents.
- Type
sin the composer with the caret at the end and no selected text. - Press the single-quote key once, then Space to commit a literal apostrophe.
- Type
il.
Expected behavior
The composer contains s' after step 3 and s'il after step 4. Accented letters should continue to compose normally.
Actual behavior
The composer contains s'´' after step 3, then s'il' after step 4. Accented letters work normally; committing an apostrophe is the broken case.
Impact
Frequent incorrect text when writing French with a dead-key keyboard layout.
Version and environment
Linux x64 desktop, 0.0.46-nightly.20261007.2774, also present in main at 611132c171f3a821bd2e32f22261135cef6330ac.
Investigation
The composer's handleTextInput treats any nonempty replacement range as selected text to surround with delimiters. ProseMirror can report a replacement range covering a provisional dead-key accent while the current editor selection is empty. Surrounding that accent with ' produces exactly s'´', then selects the accent so subsequent typing leaves a trailing apostrophe.
A focused test mounting the actual controlled ComposerPromptEditorTiptap in jsdom reproduces s'´' in both plain and rich-text modes when replaying this replacement. This is a replay of the editor's text-input boundary, not a native Linux keyboard-event capture.
Existing issues and PRs were searched for a duplicate. This report is specifically about committing a literal apostrophe, rather than accent composition or Markdown grave accents.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 3 小时 20 分钟
- 30 天内合并 PR
- 208
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pingdotgg/t3code#27445 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
pingdotgg/t3code#27146 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
pingdotgg/t3code#27022 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
area:cli bug P4
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug from-studio
难度 2/5 1-3 小时 新手友好度 65/100
esengine/DeepSeek-Reasonix#14868 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
linxiv-dev/linXiv#384 · 1 条评论 ·
维护者通常 1 天内回复
-
scope:core type:security
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
mailgun/mailgun.js#544 ·