| Summary: | IntersectionObserver with root:document does not trigger callback as expected | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Johannes Odland <johannes.odland> | ||||
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED DUPLICATE | ||||||
| Severity: | Normal | CC: | bfulgham, cathiechen, fred.wang, simon.fraser, zalan | ||||
| Priority: | P2 | ||||||
| Version: | Safari 14 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | macOS 11 | ||||||
| Attachments: |
|
||||||
|
Description
Johannes Odland
2021-04-08 05:10:55 PDT
This example works perfectly for me in Safari in Big Sur and in STP 123. Created attachment 425514 [details]
Screen shot of failing test
It fails in Versjon 14.0.3 (16610.4.3.1.7) on Big Sur 11.2.3 (20D91)
Could you try Safari Tech Preview? (Also I assume you don't have JS disabled) It seems to be working fine in STP :) I have JS enabled in Safari. The callback triggers if target is in the viewport when IntObs is instantiated. (Set target height to less than 100vh in the example) The bug got reported on one of our components and I was able to reproduce it. I then recreated it in the example I provided. I think http://trac.webkit.org/changeset/257976/webkit fixed this *** This bug has been marked as a duplicate of bug 208047 *** Any suggestions on how to improve the feature-detection? This version of Safari passes the suggested feature-detection, but the implementation is broken. https://github.com/w3c/IntersectionObserver/issues/372#issuecomment-577855647 |