react-slick
react-slick copied to clipboard
Item gets stuck off-center while scrolling vertically/diagonally
I've spotted an issue where the item gets stuck off-center when you swipe upwards as well as horizontally.
As you can see the card gets stuck to the side when scrolling vertically as well as horizontally.
This same example can be replicated on the example given on https://react-slick.neostack.com/ - though it's harder to notice because of the lack of padding.
Expected outcome:
The card should bounce back to the center, as it normally does, when swiping vertically combined with horizontally.
have same problem
Same problem here with the official demo https://codesandbox.io/s/react-slick-playground-kdme2
The trick to reproduce this issue is dragging an item and instantly releasing the mouse once the left item appears.
ok, found the solution. Just wrap one more div to the tag.
original code
<Slider {...settings}>
<div>
<img src="http://placekitten.com/g/400/200" />
</div>
working code:
<Slider {...settings}>
<div>
<div>
<img src="http://placekitten.com/g/400/200" />
</div>
</div>
Nice spot. Strange bug
strange , working for me as well , thanks
not working