Case ce-0088 · Scenario scenario-media-query-layout

Media query layout changes may disrupt contenteditable editing

OS: iOS 17.0 Device: iPhone Any Browser: Safari 17.0 Keyboard: US Status: draft
media-query layout mobile ios safari

Phenomenon

When a page with a contenteditable element responds to media query changes (e.g., orientation change, window resize), the layout changes may disrupt editing. The caret position may jump, and selection may be lost.

Reproduction example

  1. Create a contenteditable div on a responsive page.
  2. Start editing with text selected.
  3. Rotate the device or resize the window to trigger media query changes.
  4. Observe whether editing continues smoothly.
  5. Check if caret position and selection are maintained.

Observed behavior

  • In Safari on iOS, layout changes may disrupt editing.
  • Caret position may jump during layout recalculation.
  • Selection may be lost.
  • The virtual keyboard may close unexpectedly.

Expected behavior

  • Layout changes should not disrupt editing.
  • Caret position should be preserved.
  • Selection should be maintained.
  • Editing should continue seamlessly.

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: iOS 17.0
Device: iPhone Any
Browser: Safari 17.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.