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

Images keep loading even image is not part of the DOM anymore (Switching pages/views) #117

Open
rkkoszewski opened this issue Dec 15, 2022 · 0 comments

Comments

@rkkoszewski
Copy link

rkkoszewski commented Dec 15, 2022

Bug description
I'm using react-lazy-load-image-component. I have several bigger images that are loading and it can take several seconds for it to finish downloading. When I click on a link while an image is loading, the image keeps downloading in the background while the image element is not part of the DOM anymore.

I'd expect the loading of the image to be cancelled when the image element is removed from the DOM.

To Reproduce
Create a lazy loaded image element, and a link that just removes that image element. Throttle the download speed and remove the image element while it's loading, and see that in the web browser network view you can still see the image downloading.

Technical details:

  • Device [Desktop/Smartphone]: Both
  • Operating System [e.g. Windows, Mac OS, GNU/Linux]: Tested in Windows and Android
  • Browser [e.g. Firefox, Chrome, Safari]: Tested in Chrome and Edge
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

1 participant