CondeNast / react-slick

React carousel component
http://webrafter.com/opensource/react-slick
MIT License
6 stars 3 forks source link

Infinite scroll bug #9

Open tplusrex opened 7 years ago

tplusrex commented 7 years ago

Cause

The problem was introduced with this line. Calculations doesn't support infinite scroll. https://github.com/akiran/react-slick/blob/master/src/mixins/event-handlers.js#L27

Effect

When lazy loading an infinite slide the last slide does not transition right instead it transitions left. You are moved to the first slide but for infinite galleries the first slide is appended to the right of the last allowing for the infinite illusion to be seamless.

The issue is animated well here. https://github.com/akiran/react-slick/issues/698

Proposed Solution

Exclude infinite galleries from the condition. This allows infinite galleries with lazy loading to use the basic calculation.

gkilian commented 7 years ago

Fixed with https://github.com/CondeNast/react-slick/pull/8

Leaving issue open until upstreamed