From 124eb0d200bbfdcebef4239f733c47a3f4b03448 Mon Sep 17 00:00:00 2001 From: Cathy Zhu Date: Wed, 29 Aug 2018 10:48:16 -0700 Subject: [PATCH] Revert "Don't update position as we scroll (#17507)" (#17762) * Add regression manual test * Revert "Don't update position as we scroll (#17507)" This reverts commit 3553c5be91dcba92c07a32c73e8a374eb9f2a23c. --- .../amp-carousel/0.1/scrollable-carousel.js | 1 + .../amp-carousel-scroll-regression.amp.html | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 test/manual/amp-carousel-scroll-regression.amp.html diff --git a/extensions/amp-carousel/0.1/scrollable-carousel.js b/extensions/amp-carousel/0.1/scrollable-carousel.js index 1ad53fc1c581..88b31305a1be 100644 --- a/extensions/amp-carousel/0.1/scrollable-carousel.js +++ b/extensions/amp-carousel/0.1/scrollable-carousel.js @@ -190,6 +190,7 @@ export class AmpScrollableCarousel extends BaseCarousel { */ scrollHandler_() { const currentScrollLeft = this.container_./*OK*/scrollLeft; + this.pos_ = currentScrollLeft; if (this.scrollTimerId_ === null) { this.waitForScroll_(currentScrollLeft); diff --git a/test/manual/amp-carousel-scroll-regression.amp.html b/test/manual/amp-carousel-scroll-regression.amp.html new file mode 100644 index 000000000000..34d7ee57fabb --- /dev/null +++ b/test/manual/amp-carousel-scroll-regression.amp.html @@ -0,0 +1,30 @@ + + + + + AMP #0 + + + + + + + + + + + + + +