diff --git a/docs/adrs/038.client.ime-composition-at-cursor.md b/docs/adrs/038.client.ime-composition-at-cursor.md new file mode 100644 index 0000000..008a5d0 --- /dev/null +++ b/docs/adrs/038.client.ime-composition-at-cursor.md @@ -0,0 +1,47 @@ +# ADR 038: client — Composition (IME / dictation) text at the cursor + +**SPEC:** [client](../specs/client.md) +**Status:** Accepted +**Date:** 2026-10-09 + +--- + +## Context + +macOS dictation (and IME input such as Pinyin or Japanese kana) shows its in-progress text as a *composition*: the browser fires `compositionstart` / `compositionupdate` / `compositionend` and renders the uncommitted text in whichever editable element has focus. In webtty, that text appears on a new line under the terminal, in the browser's default text color. The extra line pushes the canvas up until the composition ends. + +The cause is in how ghostty-web (`Terminal.open`) sets up input: + +- The `#terminal` container gets `contenteditable="true"` and `tabindex="0"`. ghostty-web also adds a hidden `