Skip to content

Conversation

@choi2k
Copy link

@choi2k choi2k commented Feb 4, 2020

Fix #1356

document.querySelectorAll(".slick-slide img") selector will select all images under .slick-slide and add onload event on those images. if there are multiple react-slick instance on the same page, the image.onload event may be handled by other react-slick instance .

This commit aims to fix the issue by searching ".slick-slide img" in the list reference instead of document.

image.onload event will be handled by other react-slick
instance if there are more than one react-slick instance on the
same page.
@beaukode
Copy link

beaukode commented Mar 14, 2020

You are right ! I got in same issue and i found same solution after some hours of debugging....
We need a merge...

@akiran akiran merged commit 4197017 into akiran:master May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AdaptiveHeight does not re-calculate height on image load if multiple Sliders are on the page

4 participants