Case ce-0007-undo-breaks-composition · Scenario scenario-undo-with-composition

Undo during IME composition clears more text than expected

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: Korean (IME) Status: draft
undo composition ime

Phenomenon

Pressing Undo while an IME composition is active in a contenteditable element removes more text than expected, including characters that were committed before the current composition.

Reproduction example

  1. Focus the editable area.
  2. Type a short word and finalize it.
  3. Activate a Korean IME and start composing another word, but do not finalize it.
  4. Press Ctrl+Z (or the platform-specific Undo shortcut).

Observed behavior

  • Both the active composition and previously committed characters are removed.
  • The event log shows a sequence of beforeinput / input events that do not map cleanly to user intent.

Expected behavior

  • Undo reverts only the last committed edit step, or at least behaves in the same way as native controls in the same environment.

Notes

  • This behavior can interfere with predictable text editing and undo/redo stacks in products that build their own model on top of contenteditable.
Before
Hello 한
Already committed '한' and composing '글'
After Undo (Bug)
Hello
Undo deletes both '한' and '글'
vs
✅ Expected
Hello
Expected: Only cancel composing '글', '한' should be preserved

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0007-undo-breaks-composition Windows 11 Desktop or Laptop Any Chrome 120.0 Korean (IME) draft
ce-0208-korean-ime-undo-composition-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 Korean (IME) draft
ce-0209-japanese-ime-undo-composition-safari macOS 14.0 Desktop or Laptop Any Safari 17.0 Japanese (IME) draft

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
Sample HTML:
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.

Comments & Discussion

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