ampproject / ampproject/amphtml
Shadow AMP problem with fixed positioned containers
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using shadow AMP to build a web application. The AMP document needs to be rendered in a `position: fixed` container, with `overflow: scroll`
Normally, the AMP document renders and works fine, but occasionally I see that only the AMP extensions placed in the first viewport are loaded, and if you scroll inside the container the rest are not loaded, or it takes quite a long time to load.
You can see the result in the following screenshot

Since now AMP uses Intersection Observer to load its resources, I though that there would be no problem to load the AMP document inside a fixed positioned container with overflow.
Is this true, or AMP still needs `window` scroll events to properly work?
[You can find here a gist](https://gist.github.com/oliverfernandez/43df1b0a569e4643095e7620be21bf20) where the issue can be reproduced. You can reproduce it more often if in Chrome, using the Dev Tools, you do a 4x CPU slowdown
Contributor guide
Assessment
This issue has not been assessed yet.