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

Invisibility evaluate accurately #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vinzid
Copy link

@vinzid vinzid commented Oct 5, 2016

Originally, the visibility of the lazy load element is determined base on weather the width or height of the element is 0, but if the placeholder image has not loaded, the width or height can be 0, so I bind the loadElement to the load event of the element to evaluate accurately after the placeholder image loaded.
This phenomenon is not frequent, but it deed happen periodically. So it's not easy to discover, but I think it should fixed for the stability of this plugin.

@vinzid vinzid force-pushed the master branch 2 times, most recently from aff6163 to 6512f7d Compare October 5, 2016 04:44
@dinbror
Copy link
Owner

dinbror commented Oct 8, 2016

Hi @vinzid

Thanks for your PR.
I always reserve space for the images I want to lazyload, this will ensure that your issue wont happen and that the document will not have to repaint all the time.

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.

2 participants