케이스 ce-0082-contenteditable-with-intersection-observer-ko · 시나리오 scenario-intersection-observer-interference

IntersectionObserver가 예기치 않은 에디터 초기화를 유발함

OS: macOS 14.2 기기: Desktop Any 브라우저: Safari 17.2 키보드: US 확인됨
intersection-observercompositionresetsafari

현상

Safari에서 IntersectionObserver가 에디터 div를 감시하고 있고, 스크롤이나 키보드 확장 중에 해당 div의 교차 비율이 조금이라도 변경되면, 브라우저는 현재의 IME 조합(Composition)을 지워버리는 재렌더링 주기를 트리거할 수 있습니다.

재현 단계

  1. 에디터에 IntersectionObserver를 연결합니다.
  2. IME 조합(예: 한글 또는 일본어)을 시작합니다.
  3. 에디터의 위치가 약간 이동하도록 페이지를 스크롤합니다.
  4. 현재 밑줄이 그어진 텍스트가 즉시 확정되거나 삭제되는지 확인합니다.

관찰된 동작

이벤트 디스패치를 위한 Safari의 “가시성 확인” 로직이 옵저버 주기에 민감하게 반응하여, 조기에 compositionend 이벤트를 발생시킵니다.

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.2
Device: Desktop Any
Browser: Safari 17.2
Keyboard: US
Your environment
Sample HTML:
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.