Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1354 - Race condition on Cloned Lazy Load #1360

Merged
merged 1 commit into from
May 18, 2015

Conversation

simeydotme
Copy link
Collaborator

In some scenarios (one being slidesToShow: 2, slidesToScroll: 1) the
cloned slide would have it's data-lazy removed, but not actually animate
it's opacity to 1, leaving an invisible image inside the cloned slide.

I narrowed it down to the order of code inside the onload() function, and
the code outside of the onload() function. Fixed it by making the loading,
animation and attribute settings synchronous using callbacks from
the .animate() functions.

The setting of opacity: 0; now also has a very fast animation, which makes
the loading of images seem less jarring.

In some scenarios (one being slidesToShow: 2, slidesToScroll: 1) the
cloned slide would have it's data-lazy removed, but not actually animate
it's opacity to 1, leaving an invisible image inside the cloned slide.

I narrowed it down to the order of code inside the onload() function, and
the code outside of the onload() function. Fixed it by making the loading,
animation and attribute settings synchronous using callbacks from
the .animate() functions.

The setting of opacity: 0; now also has a very fast animation, which makes
the loading of images seem less jarring.
@simeydotme simeydotme self-assigned this May 18, 2015
simeydotme added a commit that referenced this pull request May 18, 2015
Fixes #1354 - Race condition on Cloned Lazy Load
@simeydotme simeydotme merged commit 9680b18 into kenwheeler:master May 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants