Case ce-0016-undo-redo-inconsistent · Scenario scenario-undo-redo-behavior

Undo and redo behavior is inconsistent across browsers

OS: Windows 11 Device: Desktop or Laptop Any Browser: Edge 120.0 Keyboard: US Status: draft
undo redo browser-compatibility

Phenomenon

The undo and redo functionality (Ctrl+Z / Ctrl+Y or Cmd+Z / Cmd+Shift+Z) behaves differently across browsers. Some browsers undo individual keystrokes, while others undo larger operations. The undo stack may also be cleared unexpectedly.

Reproduction example

  1. Create a contenteditable div.
  2. Type several words.
  3. Apply formatting (bold, italic).
  4. Type more text.
  5. Press Undo (Ctrl+Z or Cmd+Z) multiple times.
  6. Observe what gets undone at each step.

Observed behavior

  • In Edge on Windows, undo may revert entire formatting operations rather than individual keystrokes.
  • The undo stack may be cleared when focus moves away from the contenteditable.
  • Redo behavior may not work consistently after certain operations.

Expected behavior

  • Undo should revert changes in a predictable order (typically most recent first).
  • The undo stack should persist while the contenteditable remains in focus.
  • Redo should restore undone changes in reverse order.
Before
Hello World
Formatted text
After typing more
Hello World Test
Additional text input
vs
✅ Expected
Hello World
Expected: Undo per individual key press (only last 'Test' cancelled)

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.

Browser Windows macOS
Edge
Safari
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-0016-undo-redo-inconsistent Windows 11 Desktop or Laptop Any Edge 120.0 US draft
ce-0037-undo-stack-cleared macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US 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: Edge 120.0
Keyboard: US
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.