์ผ€์ด์Šค ce-0007 ยท ์‹œ๋‚˜๋ฆฌ์˜ค scenario-undo-with-composition

Undo during IME composition clears more text than expected

OS: Windows 11 ๊ธฐ๊ธฐ: Desktop or Laptop Any ๋ธŒ๋ผ์šฐ์ €: Chrome 120.0 ํ‚ค๋ณด๋“œ: Korean (IME) ์ดˆ์•ˆ
undocompositionime

์ด ํŽ˜์ด์ง€๋Š” ์•„์ง ๋ฒˆ์—ญ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค

ํ˜„์žฌ ์˜์–ด ์›๋ฌธ์„ ํ‘œ์‹œํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฒˆ์—ญ์— ๊ธฐ์—ฌํ•ด ์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

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.

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.