Fall ce-0002 · Szenario scenario-ime-enter-breaks

Composition is cancelled when pressing Enter inside contenteditable

OS: Windows 11 Gerät: Desktop or Laptop Any Browser: Chrome 120.0 Tastatur: Korean (IME) Entwurf
compositionimeenter

Diese Seite wurde noch nicht übersetzt

Derzeit wird der englische Originalinhalt angezeigt. Wir freuen uns über Ihre Hilfe bei der Übersetzung.

Phenomenon

When composing Korean text with an IME in a contenteditable element, pressing Enter cancels the composition and sometimes commits only a partial syllable. In some browser and IME combinations, the caret moves to the next line but the last composed character is lost.

Reproduction example

  1. Focus the editable area.
  2. Activate a Korean IME.
  3. Type several syllables but do not finalize the composition.
  4. Press Enter to insert a new line.

Observed behavior

  • The compositionend event fires with incomplete data.
  • The caret moves to the next line.
  • The last composed syllable is missing from the DOM text content.

Expected behavior

  • The IME finalizes the current composition before inserting a line break.
  • The last composed syllable remains in the DOM text content.

Notes and possible direction for workarounds

  • Observe the sequence of beforeinput, compositionend, and input events in the playground.
  • Check whether the browser emits a beforeinput event with inputType = 'insertParagraph' before or after compositionend.
  • A possible workaround is to intercept Enter on keydown and prevent the default behavior while waiting for composition to complete, but this changes the native editing behavior and must be evaluated carefully per product.

Varianten dieses Szenarios

Fall OS Browser Status
ce-0002 Windows 11 Chrome 120.0 Entwurf
ce-0022 Windows 11 Firefox 120.0 Entwurf

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: Korean (IME)
Your environment

Use this editable area to reproduce the described case.

Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.