Skip to content

fix(editor/db): dead-key composition on international keyboard layouts - #12927

Open
hildersantos wants to merge 1 commit into
logseq:masterfrom
hildersantos:fix/dead-key-composition
Open

fix(editor/db): dead-key composition on international keyboard layouts#12927
hildersantos wants to merge 1 commit into
logseq:masterfrom
hildersantos:fix/dead-key-composition

Conversation

@hildersantos

Copy link
Copy Markdown

Fix #logseq/db-test#10

Problem

On layouts where ` ~ ^ are dead keys (macOS BR, US International, etc.) the composition guard never fired for the editor's raw keydown events, so autopair ran mid-composition: chars were duplicated and the canceled composition never fired compositionend, leaving :editor/in-composition? stuck and suppressing every save until the block content vanished.

Solution

  • detect composition on raw DOM keyboard events in the keydown autopair guard
  • treat the first non-composing input as composition end when compositionend never fires
  • run autopair for ` and ~ (and the ^^ pair) on composition commit, restoring markdown shortcut parity with US layouts
  • add CDP-based dead-key emulation helpers and an e2e regression suite

@CLAassistant

CLAassistant commented Jul 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

On layouts where ` ~ ^ are dead keys (macOS BR, US International, etc.)
the composition guard never fired for the editor's raw keydown events, so
autopair ran mid-composition: chars were duplicated and the canceled
composition never fired compositionend, leaving :editor/in-composition?
stuck and suppressing every save until the block content vanished.

- detect composition on raw DOM keyboard events in the keydown autopair guard
- treat the first non-composing input as composition end when compositionend
  never fires
- run autopair for ` and ~ (and the ^^ pair) on composition commit,
  restoring markdown shortcut parity with US layouts
- add CDP-based dead-key emulation helpers and an e2e regression suite
@hildersantos
hildersantos force-pushed the fix/dead-key-composition branch from 81fb0e0 to 12ea5bb Compare July 21, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS] Markdown shortcuts for code, codeblock, strikethrough and others not working on international keyboard layouts

2 participants