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

It will not render on the second time of modal open unless moving mouse on the image / or open another modal contains different image #254

Closed
vincent-cm opened this issue Dec 27, 2017 · 2 comments

Comments

@vincent-cm
Copy link

vincent-cm commented Dec 27, 2017

I think the first time of modal close will move the element to inner the div immediately through twitter-bootstrap (without removing the dom, just display: none) which does not trigger the onDestroy defined in lazyload-image.directive.ts unless url input
changed.

So the second time of modal open with the same image url will have to move the mouse/scroll to get view rendered.

ps: ngAfterContentInit is also not triggered by closing the modal

@tjoskar
Copy link
Owner

tjoskar commented Dec 30, 2017

There is no easy fix for this since it's not possible to watch for dom changes. The only way is to let ng-lazyload-image know when the images become visible (again). Take a look at this comment:
#197 (comment)

So in your case you will need to emit an event when the modal was loaded. Do you think it is possible?

@tjoskar
Copy link
Owner

tjoskar commented Jan 27, 2018

Closing this due to inactivity. Let me know if this is still an issue.

@tjoskar tjoskar closed this as completed Jan 27, 2018
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

No branches or pull requests

2 participants