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

<Image/> "lazy" not working in Modal #335

Closed
hong-chan opened this issue Sep 11, 2019 · 2 comments
Closed

<Image/> "lazy" not working in Modal #335

hong-chan opened this issue Sep 11, 2019 · 2 comments

Comments

@hong-chan
Copy link

When using lazy={true} of Image in a Modal, images would not load even when it become visible.

Demo:
https://codesandbox.io/embed/sleepy-dijkstra-pd9q9

@DanielchenN
Copy link
Contributor

Thank u for telling us.
In current version, "lazy" only listens the document's scroll event. But in your demo, the scrollbars is created by modal through "overflow: scroll" which leads to the failure of lazy loading. We will fix this in next version through providing a new api.

@nikomal
Copy link
Member

nikomal commented Oct 9, 2019

in 1.4.2, using container can let Image lazy in modal or other div which has overflow: scroll, see docs

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

4 participants