Firefox undo/redo stack corrupted by DOM mutations during input
OS: Windows 10/11 · Device: Desktop Any · Browser: Firefox 115.0+ · Keyboard: US QWERTY
Open case →Scenario
In Firefox, programmatic DOM changes during typing (auto-formatting, spellcheck fixes, framework reconciliation) can desynchronize the internal undo stack. Undo/redo may jump to wrong snapshots or truncate history.
In Firefox, programmatic DOM changes during typing (auto-formatting, spellcheck fixes, framework reconciliation) can desynchronize the internal undo stack. Undo/redo may jump to wrong snapshots or truncate history.
Gecko’s contenteditable undo model ties to editing sessions and DOM mutations. When JavaScript or the browser inserts nodes between keystrokes, the undo ring may record boundaries that do not match user intent.
Data loss perception, broken editor sync layers, and difficult-to-reproduce bug reports.
Chromium and WebKit have different undo granularity; this scenario is specifically about Firefox’s stack interaction with mid-input DOM changes.
compositionend or idle time.Visual view of how this scenario connects to its concrete cases and environments. Nodes can be dragged and clicked.
Each row is a concrete case for this scenario, with a dedicated document and playground.
| Case | OS | Device | Browser | Keyboard | Status |
|---|---|---|---|---|---|
| ce-0224-firefox-undo-corruption | Windows 10/11 | Desktop Any | Firefox 115.0+ | US QWERTY | draft |
Open a case to see the detailed description and its dedicated playground.
OS: Windows 10/11 · Device: Desktop Any · Browser: Firefox 115.0+ · Keyboard: US QWERTY
Open case →Other scenarios that share similar tags or category.
Programmatic inserts or execCommand during typing can split undo transactions or clear the stack—browser-specific rules differ from custom editor history.
In Chromium, programmatic DOM updates (normalization, wrapping, React reconciliation) while the user is typing can move the caret to the end of the contenteditable or to an unexpected boundary—especially when the mutation happens between keystrokes.
Using the HTML drag-and-drop API inside or alongside contenteditable regions often diverges from behavior on plain elements: default actions, `contenteditable` hit-testing, and `beforeinput`/`drop` ordering differ by browser. Custom editors must reconcile native DnD with their own selection model.
Dragging selected content inside a contenteditable region on Firefox can duplicate nodes or leave ghost fragments—different from Chrome's behavior.
Firefox may hide or misplace the caret when moving across contenteditable=true/false boundaries—widgets and embeds inside editors are affected.
Have questions, suggestions, or want to share your experience? Join the discussion below.