[amp-next-page] [v0.1] Overrides runtime params set by viewer (including paddingTop)
What's the issue?
When embedded in a viewer, amp-next-page appears to override params set by the viewer (in particular paddingTop). In our use case, the top padding added to the document body by the viewer is removed and this causes the document body to appear to jump up and behind a fixed header, when amp-next-page is initialized.
This was observed with v0.1 of amp-next-page, but it may also exist with v1.0, since both seem to only set the visibility state viewer param. relevant code v0.1 relevant code v1.0
How do we reproduce the issue?
- Go to https://www.google.com/amp/s/www.forbes.com/sites/rachelsandler/2020/10/30/facebook-temporarily-stops-recommending-political-groups-to-combat-election-misinformation/amp/.
- Observe that, once amp-next-page successfully bootstraps, the 32px of top padding that had been added to the document body to compensate for the viewer bar is set to 0px and the fixed header at the top of the page hides some of the content. (would recommend setting a breakpoint here to help demonstrate)
- Observe this does not happen outside a viewer, e.g., https://www.forbes.com/sites/rachelsandler/2020/10/30/facebook-temporarily-stops-recommending-political-groups-to-combat-election-misinformation/amp/.
What browsers are affected?
Viewers only, Chrome, Pixel 2
Which AMP version is affected?
Observed October 29 2020, but uncertain if this issue existed prior. AMP version: 2010200130000.
Hi @nainar are you know, Forbes is one of the early adopters of
Nevertheless they are still experimenting this issue in the amp viewer. Any help is highly appreciated!
@dmanek to take a look
Hi @iingato the URL you've added does not have an amp-next-page. Do you another with amp-next-page where this issue is reproducible?
Hey @iingato can you respond to my comment above?
Closing since there is no update.