Scenario

IME composition when focus moves between elements (Korean and others)

If the user switches focus to another field, button, or nested contenteditable while Korean (or other) IME composition is active, browsers differ on whether composition is committed, cancelled, or leaves orphan state. Chrome, Safari, and Firefox do not agree; mobile adds more variance.

ime
Scenario ID
scenario-ime-composition-focus-change

Details

If the user switches focus to another field, button, or nested contenteditable while Korean (or other) IME composition is active, browsers differ on whether composition is committed, cancelled, or leaves orphan state. Chrome, Safari, and Firefox do not agree; mobile adds more variance.

Problem Overview

blur during composition triggers compositionend in some paths but not others; the same gesture on three engines can yield three different DOM outcomes.

Observed Behavior

  • Focus moves to toolbar: in-flight Hangul may commit to the editor or disappear.
  • Nested editables: focus may move without a full composition lifecycle.

Impact

Lost input, duplicate characters when refocusing, or editor state diverging from IME state.

Browser Comparison

This scenario groups ce-0229 / ce-0230 / ce-0231 (Chrome, Firefox, Safari) for Korean IME focus/blur—compare reproduction steps across cases.

Solutions

  • On blur, if isComposing, optionally commit or cancel explicitly via IME-aware paths (platform-dependent; test only).
  • Avoid moving focus programmatically during active composition unless unavoidable.

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-0229-korean-ime-focus-blur-chrome Windows 10/11 Desktop or Laptop Any Chrome 120+ Korean (IME) - Microsoft IME draft
ce-0230-korean-ime-focus-blur-firefox Windows 10/11 Desktop or Laptop Any Firefox 120+ Korean (IME) - Microsoft IME draft
ce-0231-korean-ime-focus-blur-safari macOS 13+ Desktop (Mac) Any Safari 17+ Korean (IME) - macOS Korean Input Method 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

Open a case to see the detailed description and its dedicated playground.

Related Scenarios

Other scenarios that share similar tags or category.

Tags: ime, composition, focus, blur, korean, chrome, safari

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, korean, chrome, firefox

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, korean, firefox

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, chrome, firefox

keyCode 229 and Enter during IME composition

During IME composition, keydown often reports keyCode 229 (VK_PROCESSKEY on Windows) for many keys, meaning the event is part of an input method sequence. Enter may commit composition, insert a newline, or be swallowed—Chrome vs Firefox vs Japanese layouts differ. Handlers that assume Enter always means insertParagraph break composition incorrectly.

3 cases
Tags: ime, composition, safari, firefox

Tab key during IME composition (focus vs indent vs IME)

Tab moves focus by default. During IME composition, Tab may cancel composition, cycle candidates, or be captured by the editor for indentation—behavior differs for Chinese, Thai, and Safari vs Firefox.

2 cases

Comments & Discussion

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