IntersectionObserver inside iFrame uses frame as ImplicitRoot, not the parent
Reported by
dschub...@mozilla.com,
Nov 6
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0 Steps to reproduce the problem: 1. Open https://jsfiddle.net/8f9whxbk/11/ 2. Observe that the intersectionRect is being reported as left=8, top=8 What is the expected behavior? intersectionRect should represent the position within the parent document. What went wrong? According to the spec (https://w3c.github.io/IntersectionObserver/#intersectionobserver-implicit-root): > or else the top-level browsing context’s document node (referred to as the implicit root) if the root attribute is null. So Blink's behavior of using the frame's boundaries as root is probably wrong. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 72.0.3603.0 Channel: n/a OS Version: OS X 10.14 Flash Version: Firefox uses the parent document's boundaries.
,
Nov 6
,
Nov 6
The parent document *is* being used as the implicit root; however, the intersection rect is reported in the coordinate system of the iframe document. From the spec: "6. Map intersectionRect to the coordinate space of the viewport of the Document containing the target." https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
,
Nov 7
Ah thanks, I totally missed that. |
|||
►
Sign in to add a comment |
|||
Comment 1 by dtapu...@chromium.org
, Nov 6Components: Blink>Layout