(intersection-observer) intersectionRect not mapped to the document containing the target in iFrames

NEW
Unassigned

Status

()

defect
6 months ago
4 months ago

People

(Reporter: denschub, Unassigned)

Tracking

(Blocks 1 bug)

unspecified
Points:
---
Bug Flags:
webcompat ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

6 months ago
In the example at [0], an IntersectionObserver is used inside an iFrame (the jsFiddle iframe, in this case). You can observe that the intersectionRect reports something like left=846,top=517. According to the spec[1], this shouldn't be the case:

> 6. Map intersectionRect to the coordinate space of the viewport of the Document containing the target.

So I'd expect the intersectionRect to be relative to the document inside the iframe, thus reporting left=8,top=8. This works fine in Chrome, Safari, and Edge.

[0]: https://jsfiddle.net/8f9whxbk/11/
[1]: https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
(Reporter)

Comment 1

6 months ago
I feel like this could have been done in bug 1359318, but I couldn't confirm this patch actually changed anything in older versions with mozregression. Since :tobytailor isn't working with us anymore, I figured it might be best just to open a new bug.
See Also: → 1359318
(Reporter)

Updated

5 months ago
Flags: webcompat?
You need to log in before you can comment on or make changes to this bug.