Case ce-0081 · Scenario scenario-resize-observer-interference

ResizeObserver may cause layout shifts during contenteditable editing

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
resize-observer layout performance chrome windows

Phenomenon

When a ResizeObserver is attached to a contenteditable element, the observer may trigger during editing as content changes size. This can cause layout recalculations and visual jumps, especially when the contenteditable has dynamic height.

Reproduction example

  1. Create a contenteditable div with auto height.
  2. Attach a ResizeObserver to monitor size changes.
  3. Type text that causes the contenteditable to grow.
  4. Observe any layout shifts or visual jumps.
  5. Check if the observer callbacks affect editing performance.

Observed behavior

  • In Chrome on Windows, ResizeObserver may trigger frequently during editing.
  • Layout recalculations can cause visual jumps.
  • The caret position may shift unexpectedly.
  • Performance may be affected by frequent resize events.

Expected behavior

  • ResizeObserver should not cause layout shifts during editing.
  • Or, resize events should be debounced or batched.
  • Caret position should remain stable during resize.

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: US
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.