Skip to content

Android Enter interception leaves the IME composing region open across submit + draft clear #103

Description

@radroid

Found during the 2026-08-14 sync seam review. The fork's two plain-Enter interceptions in apps/mobile/modules/t3-composer-editor/android/.../T3ComposerEditorView.kt (the onKeyDown branch and the InputConnectionWrapper.commitText override) fire submitListener without calling finishComposingText(), and the subsequent controlled editor.setText(value) draft clear lands on top of a possibly-live composing region.

Before the fork, Enter went through the normal IME path, which finishes composing as a side effect. Now (a) the submitted text may omit the IME's pending autocorrection, and (b) clearing text under a live composing region is the classic Android IME-desync trigger — the precise class upstream spent this cycle stabilizing (pingdotgg#5986's no-op-skip guards, suggestion preservation).

Fix: in SelectionAwareEditText, call finishComposingText() on the active input connection before submitListener?.invoke() on both paths. Needs on-device Android QA (deferred since the original commit; local RN builds OOM this machine — use EAS). Related deliberate trade-off worth a seam-ledger line: consuming plain Enter removes the IME's Enter-accepts-suggestion affordance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions