react-image-gallery icon indicating copy to clipboard operation
react-image-gallery copied to clipboard

White space appears between slides when swiping/navigating on mobile browsers

Open vladimir-fsh opened this issue 6 years ago • 6 comments

On the demo page in any iPhone try to swipe or click on next arrow. Every time a next image will appear is empty for short time (~100ms).

vladimir-fsh avatar May 15 '18 09:05 vladimir-fsh

I noticed that and it seems to only be happening on mobile browsers. I'm not sure whats going on there.

xiaolin avatar May 15 '18 23:05 xiaolin

Probably it happens cause nodes of slides removed and pushed again

vladimir-fsh avatar May 16 '18 08:05 vladimir-fsh

If anyone finds the cause please reopen.

xiaolin avatar May 24 '18 02:05 xiaolin

+1 it also happen on the web. the translate property adds 0% 50% 100% and so on to every slide. removing the translate fix it for me. but its a buggy hack. wonder why the translate is pushing images down. instead of a row

Multi-Thinker avatar Jan 19 '20 18:01 Multi-Thinker

I am getting the same behavior with the thumbnails, I noticed it is something related to the transform property that allows values upper the initial one. e.g transform: translate3d(15.0735px, 0px, 0px);

Goye avatar Sep 02 '22 00:09 Goye

Did some debugging, and this looks to be an image loading issue on mobile browsers. The problem goes away when using the same images for all the slides. Will need further investigation to determine a solution...

cannot reproduce using same images e.g.

const images = [
  {
    original: "https://picsum.photos/id/1018/1000/600/",
    thumbnail: "https://picsum.photos/id/1018/250/150/",
  },
  {
    original: "https://picsum.photos/id/1018/1000/600/",
    thumbnail: "https://picsum.photos/id/1018/250/150/",
  },
  {
    original: "https://picsum.photos/id/1018/1000/600/",
    thumbnail: "https://picsum.photos/id/1018/250/150/",
  },
  {
    original: "https://picsum.photos/id/1018/1000/600/",
    thumbnail: "https://picsum.photos/id/1018/250/150/",
  },
];

xiaolin avatar Jul 31 '23 18:07 xiaolin