Skip to content

amp-lightbox-gallery: issue when only 2 images #22608

Description

@javierparis

When triggering an amp-lightbox-gallery that only has 2 images, it's not possible to swipe to the right, and swiping to the left has a flickering effect and it's not consistently displaying the image

How to reproduce it:
Go to the playground for amp-lightbox-gallery
https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fexamples%2Fcomponents%2Famp-lightbox-gallery&mode=Galaxy+S5
and leave only 2 images, something like this:

<div>
    <amp-img lightbox src="https://preview.amp.dev/static/samples/img/road-1.jpg" width="300" height="200" layout="responsive"></amp-img>
    <p class="paragraph">Lorem ....</p>
    <amp-img lightbox src="https://preview.amp.dev/static/samples/img/road-2.jpg" width="300" height="200" layout="responsive"></amp-img>
    <p class="paragraph">Lorem ....</p>
  </div>

Reproduce it using Google Chrome tools, trigger the device toolbar, and choose iphone 6/7/8 for instance. Arrows seem to work though

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions