Scenario

Undo/redo stack does not include programmatic DOM changes

Undo/redo stack does not include programmatic DOM changes

Scenario ID
scenario-undo-redo-stack-programmatic-changes

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-0303-undo-redo-stack-programmatic-changes Any Any Desktop or Laptop Any Chrome Latest US draft

Cases

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

Related Scenarios

Other scenarios that share similar tags or category.

Tags: undo, redo

Undo and redo behavior is inconsistent across browsers

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.

2 cases
Tags: undo, redo

Undo/redo stack management is inconsistent

The undo/redo stack in contenteditable elements behaves inconsistently across browsers. Programmatic DOM changes may or may not be added to the undo stack, and the stack may be cleared unexpectedly. Custom undo/redo implementation is often necessary.

5 cases
Tags: dom-manipulation

Browser translation breaks contenteditable editing

When browser translation features (like Google Translate) are activated, they manipulate the DOM by replacing text content and injecting elements. This can break contenteditable functionality, causing cursor positioning issues, event handling problems, and IME composition failures.

1 case
Tags: programmatic

Programmatic focus selects all content

In Chrome and Safari, calling focus() on a contenteditable div can select the entire content instead of placing the cursor at the beginning, as observed in Firefox and IE.

1 case
Tags: dom-manipulation

Selection restoration after DOM manipulation is unreliable

After programmatically manipulating the DOM in a contenteditable element, restoring the text selection (cursor position) is unreliable across browsers. The selection may be lost, moved to an incorrect position, or become invalid.

5 cases

Comments & Discussion

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