Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Dead-key apostrophe inserts extra quotes in the composer

Đang mở Phù hợp với người mới
#16,859 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ElieSauveterre đang làm issue này rồi.

Từ ngày 7/10/2026.

  • #16884 của @ElieSauveterre — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu tại handleTextInput của trình soạn thảo composer (component là ComposerPromptEditorTiptap, apps/web), nơi hiện tại mọi vùng thay thế không rỗng đều được coi là văn bản được chọn để bao quanh bằng dấu phân cách. Cách sửa là phân biệt giữa việc thay thế dead-key tạm thời và văn bản thực sự được chọn — kiểm tra xem vùng chọn của trình soạn thảo có rỗng trước khi bao quanh hay không. Dựa trên test jsdom có focus mount ComposerPromptEditorTiptap và phát lại phép thay thế, khẳng định s' rồi s'il ở cả chế độ plain và rich-text, và xác nhận các test composer hiện có vẫn pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug via-triage
Area

apps/web, including the Linux desktop composer.

Steps to reproduce
  1. Use a keyboard layout where the apostrophe key is a dead key for accents.
  2. Type s in the composer with the caret at the end and no selected text.
  3. Press the single-quote key once, then Space to commit a literal apostrophe.
  4. 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.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
8 giờ 34 phút
Pull request đã merge (30 ngày)
243

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.