Amphtml: AMP page jumps on scroll when loaded outside viewer

Created on 15 Aug 2017  路  12Comments  路  Source: ampproject/amphtml

We're seeing weird page jump on some of our sites. To repro open the page in Safari or Chrome on an iPhone or iPad and scroll. The page will jump to the bottom for no apparent reason.

http://amp.miamiherald.com/sports/spt-columns-blogs/armando-salguero/article167292462.html

We think it may be related to the video iframe but it's unclear how since there is no way I know of for an iframe to scroll a different origin parent.

This behavior is not seen when loaded in the amp viewer.

Edit: it does happen in the viewer, it's just not as pronounced. It also happens on other sites that embed a video play via an iframe, I've reproduced it on both the jwplayer and the anvato player. It appears to be a loop in osd.js in the google IMA code.

Externally Tracked Drop Everything

All 12 comments

Update: seems to be related to osd.js in the Google ad code - it's looping failing a cross domain frame access

image

Whoooaa page jump.

Can confirm it's in a JS loop in OSD.js that's killing the device CPU (and presumably battery). It's google IMA code in a jwplayer in an iframe. Almost certainly not an AMP runtime bug.

@shawnbuso @aghassemi could you PTAL? Thanks.

@jasti Please file an internal bug against OSD team. Not much we can do here.

For those working at Google, you can see the bug here: b/64719101
@jpettitt we'll keep you posted on the issue.

@jasti thanks - FYI I updated the jwplayer to the latest 7.12.4 and it made no difference.

I can repro on the anvato player as well as the jwplayer on other sites

anvato:
http://amp.wsbtv.com/news/local/governor-candidate-calls-for-removal-of-confederate-carving-at-stone-mountain/592409692

jw:
http://amp.wmur.com/article/untimely-deaths-of-two-people-under-investigation-in-haverhill/12013299

I'm also able to repro the loop, but not the scroll jump, on safari desktop. I'm guessing more CPU on desktop is masking the issue.

Non amp pages using an iframed player exhibit the same behavior with Safari

http://www.kob.com/albuquerque-news/eye-on-new-mexico-pulling-back-the-curtain-on-abq4ward/4573047/?cat=13179

any ETA on a fix? We're looking at possibly having to pull pre-roll ads ...

No ETA

The team responsible for the relevant in-ad code has fixed this pending final rollout. Will close here as it was not AMP related.

Fix has been rolled out.

Was this page helpful?
0 / 5 - 0 ratings