Scenario

Space key behavior during IME composition

During active IME composition, pressing Space may commit the segment, insert a literal space, be ignored, or cancel composition—depending on language, IME, and browser. Editors that assume Space always inserts U+0020 can lose characters or break composition state.

ime
Scenario ID
scenario-space-during-composition

Details

During active IME composition, pressing Space may commit the segment, insert a literal space, be ignored, or cancel composition—depending on language, IME, and browser. Editors that assume Space always inserts U+0020 can lose characters or break composition state.

Problem Overview

Space is overloaded: it can mean “pick first candidate”, “insert word separator”, or “commit and insert space”. The same physical key is handled differently in CJK, Thai, Indic, and RTL scripts. beforeinput / input sequences also vary.

Observed Behavior

  • Space is swallowed or ignored until composition ends.
  • Space commits early and loses the intended syllable.
  • Conflicts between editor shortcuts and IME expectations.

Impact

Lost or duplicated characters, broken undo boundaries, and divergent behavior between desktop and mobile keyboards.

Browser Comparison

Chromium, WebKit, and Gecko each route Space through different IME pipelines; Linux IBus/Fcitx stacks add another layer.

Solutions

  • Do not handle Space globally while isComposing is true unless you have a language-specific reason.
  • Prefer reading the final committed text from input events rather than predicting Space behavior.
  • Test Thai, Japanese, Arabic, and Hindi IMEs explicitly—patterns differ from Korean/Chinese.

Best Practices

  • Respect compositionstart / compositionend and avoid DOM mutations that split the composing range.

References

Scenario flow

Visual view of how this scenario connects to its concrete cases and environments. Nodes can be dragged and clicked.

React Flow mini map

Variants

Each row is a concrete case for this scenario, with a dedicated document and playground.

Case OS Device Browser Keyboard Status
ce-0010-space-lost-during-composition Windows 11 Desktop or Laptop Any Edge 120.0 Korean (IME) draft
ce-0183-japanese-ime-space-conversion-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Japanese (IME) draft
ce-0184-thai-ime-space-ignored-firefox Windows 11 Desktop or Laptop Any Firefox 120.0 Thai (IME) draft
ce-0197-arabic-ime-space-ignored-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Arabic (IME) draft
ce-0198-hindi-ime-space-ignored-firefox Windows 11 Desktop or Laptop Any Firefox 120.0 Hindi (IME - Devanagari) draft

Browser compatibility

This matrix shows which browser and OS combinations have documented cases for this scenario. Click on a cell to view the specific case.

Confirmed
Draft
No case documented

Cases

This scenario affects multiple languages. Cases are grouped by language/input method below.

Arabic

1 case

Hindi/Devanagari

1 case

Japanese

1 case

Korean

1 case

Thai

1 case

Related Scenarios

Other scenarios that share similar tags or category.

Tags: ime, composition, thai

Combining characters and complex scripts during IME composition

Scripts that use combining marks, conjuncts, or tone marks (e.g. Thai, Devanagari, Vietnamese, Cyrillic) may compose differently across browsers. Diacritics can be lost, reordered, or split across DOM nodes when the editor normalizes or wraps text during composition.

4 cases
Tags: ime, composition, arabic

Escape key during IME composition

Escape typically cancels IME composition or closes the candidate window. In Edge, Firefox, and other engines, timing and whether partial text remains in the DOM differ—Arabic and Korean IME cases show cross-browser variance.

2 cases
Tags: ime, composition, japanese

Blur and focus during IME composition (CJK and Japanese Safari)

Moving focus away from the editor while composing text (Chinese, Japanese, Korean) can cancel composition, commit partial text, or leave the IME candidate window out of sync. Safari often shows distinct behavior for Japanese; Chrome behavior for Chinese/Korean is covered in related cases.

2 cases
Tags: ime, composition, hindi

Paste during IME composition cancels or corrupts composition

Pasting from the clipboard while IME composition is active may cancel the composition session, replace the wrong range, or interleave pasted text with unfinished syllables—Firefox and Chrome show different behavior for Korean and Hindi IME paths.

2 cases
Tags: ime, composition, japanese

Scrolling cancels or disrupts IME composition

User scrolling the page or scrollable editor while the IME candidate window is open may cancel composition or move the caret out of sync—reported on iOS Safari with Japanese IME and Android Chrome with Chinese IME when scroll containers move the editing context.

2 cases

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.