Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#16,859 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ElieSauveterre is already working on this.

Since Oct 7, 2026.

  • #16884 by @ElieSauveterre — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start at the composer editor's handleTextInput (the component is ComposerPromptEditorTiptap, apps/web), where any nonempty replacement range is currently treated as selected text to surround with delimiters. The fix is to distinguish a provisional dead-key replacement from real selected text — check whether the editor selection is empty before wrapping. Build on the focused jsdom test that mounts ComposerPromptEditorTiptap and replays the replacement, asserting s' then s'il in both plain and rich-text modes, and confirm existing composer tests still pass.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
8h 34m
Merged PRs (30d)
243

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.