amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

[amp-next-page] [v0.1] Overrides runtime params set by viewer (including paddingTop)

Open iingato opened this issue 6 years ago • 5 comments

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?

  1. 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/.
  2. 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)
  3. 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.

iingato avatar Nov 02 '20 18:11 iingato

Hi @nainar are you know, Forbes is one of the early adopters of and they're currently using the latest version of the component.

Nevertheless they are still experimenting this issue in the amp viewer. Any help is highly appreciated!

demianrenzulli avatar Nov 02 '20 20:11 demianrenzulli

@dmanek to take a look

nainar avatar Jan 11 '21 23:01 nainar

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?

dmanek avatar Feb 03 '21 17:02 dmanek

Hey @iingato can you respond to my comment above?

dmanek avatar Jul 07 '21 17:07 dmanek

Closing since there is no update.

dmanek avatar Apr 21 '22 03:04 dmanek