From e05e9f1e942c34fed85ce675d450711697b023a6 Mon Sep 17 00:00:00 2001 From: Gabriel Majoulet Date: Fri, 3 Aug 2018 16:31:33 -0400 Subject: [PATCH] Don't send progress events to the progress bar for ad pages. (#17288) --- extensions/amp-story/1.0/amp-story-page.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/amp-story/1.0/amp-story-page.js b/extensions/amp-story/1.0/amp-story-page.js index 0ede01e38681..a1d08b6b5f84 100644 --- a/extensions/amp-story/1.0/amp-story-page.js +++ b/extensions/amp-story/1.0/amp-story-page.js @@ -603,6 +603,11 @@ export class AmpStoryPage extends AMP.BaseElement { * @param {number} progress The progress from 0.0 to 1.0. */ emitProgress_(progress) { + // Don't emit progress for ads, since the progress bar is hidden. + if (this.isAd()) { + return; + } + const payload = dict({ 'pageId': this.element.id, 'progress': progress,