ケース ce-0082 · シナリオ scenario-intersection-observer-interference

IntersectionObserver may affect contenteditable visibility detection

OS: macOS 14.0 デバイス: Desktop or Laptop MacBook Pro ブラウザ: Safari 17.0 キーボード: US 下書き
intersection-observervisibilitysafarimacos

このページはまだ翻訳されていません

現在、英語の原文を表示しています。翻訳への貢献をお待ちしております。

Phenomenon

When an IntersectionObserver is used to detect when a contenteditable element becomes visible or hidden, the observer may not fire correctly during editing. Changes to content size or position during editing may not trigger intersection updates as expected.

Reproduction example

  1. Create a contenteditable div that can scroll in and out of view.
  2. Attach an IntersectionObserver to detect visibility.
  3. Edit content that changes the element’s size.
  4. Scroll the contenteditable in and out of view.
  5. Observe whether intersection callbacks fire correctly.

Observed behavior

  • In Safari on macOS, IntersectionObserver may not update correctly during editing.
  • Content size changes may not trigger intersection recalculations.
  • Visibility detection may be delayed or incorrect.
  • The observer may miss rapid content changes.

Expected behavior

  • IntersectionObserver should work correctly with contenteditable.
  • Content changes should trigger intersection recalculations.
  • Visibility detection should be accurate and timely.

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: macOS 14.0
Device: Desktop or Laptop MacBook Pro
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.