Skip to content

amp-carousel: Janky swiping in [type=slides][loop] with 2 slides #20685

@dreamofabear

Description

@dreamofabear

Try the following in AMP playground:

  <amp-carousel width="400" height="300" layout="responsive" type="slides" loop>
    <amp-img src="/img/image1.jpg" width="400" height="300" layout="responsive" alt="a sample image"></amp-img>
    <amp-img src="/img/image2.jpg" width="400" height="300" layout="responsive" alt="another sample image"></amp-img>
  </amp-carousel>

Swiping between slides is janky/broken. One possible fix is to override shouldLoop in slidescroll.js when number of slides < 3.

Context: b/123093858

/cc @aghassemi

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions