-
Notifications
You must be signed in to change notification settings - Fork 871
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
lazy state not changing to loaded #384
lazy state not changing to loaded #384
Comments
I am seeing the same issue in my project. My placeholder styling stays in place indefinitely, even after the image is loaded, but any hovering or scrolling events quickly changes the state and my image appears. |
@rickhall Are your images by any chance, in a page that is rendered before the user lands on it ? |
No. You can see the same bug in this demo: http://hilongjw.github.io/vue-lazyload/ You can just keep clicking "Switch" until you see some images come up an remain the "spinner" icon. When that happens, then scroll the window and you'll see the actual image appear. I just looks like the library is not reacting to load events properly. |
We are facing a similar issue. Did you manage to solve it? |
I'm not sure if it was fixed, since I moved away from the approach and did it a different way. |
I was having the same issue as @rickhall . setting |
The fact that this issue is clearly visible in the demo is sort of a hint that it is a bug. It would be nice to have it fixed, but I just implemented lazy loading myself, since it is not that difficult to do. |
@rickhall Yeah I think this repo might not be maintained anymore. Would you be able to share your solution? |
@tarponjargon I didn't create a generic component, I just did something specific for my situation. Effectively, I just used a class marker to mark my non-rendered elements, listened for scroll and window resize events, when I received events, checked if the bounding box of any non-rendered elements intersected the visible viewport, if so I loaded its image and removed the non-rendered marker. |
@rickhall thanks for the info |
I am loading a vue component, but the image lazy state is not changing to loaded, until and unless I am hovering over the component. The images are present in the viewport. The issue is observed even after the images have been downloaded. I am using the same component in other pages, but there the issue is not observed.
This is how it's used
Here we are initializing it
Vue.use(VueLazyLoad, { loading: "./Default_Image.png", error: "./Default_Image.png" })
HTML
The page on which we are using is displayed in a tab. I don't think that should be a problem though.
Not able to figure out what is wrong. :(
The text was updated successfully, but these errors were encountered: