You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed instructions in documentation written for my React-PDF version
I have checked if this bug is not already reported
I have checked if an issue is not listed in Known issues
If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
If the Document component is unmounted, then the request for the resource should be cancelled. It was the usual behaviour of v9.1.0. But it changed in v9.1.1. Now, it doesn't cancel the fetch request.
Steps to reproduce
Throttle the network from the devtool
Mount a Document with a url of a pdf
Before it's loaded, change the url or unmount the Document
Expected behavior
The request to the resource should be cancelled.
Actual behavior
The requests are still running in the background and it's throttling the network speed.
Additional information
Consider these two scenarios where:
One can open the modal and close it before the documents are loaded
One can navigate left or right to see the other documents
In both cases, the instances of the Document components will be unmounted. In v9.1.0, the requests would have been cancelled. But that version had an issue mentioned here: #1062 which was fixed by this PR: #1877
With the new release v9.1.1, the requests don't get cancelled anymore. So, if I navigate through 10 PDFs which were not loaded while navigating, they don't get cancelled which in turn throttles the network speed for the ones I want to view.
Environment
Browser (if applicable): Chrome v129
React-PDF version: 9.1.1
React version: 16.14.0
Bundler name and version (if applicable):
The text was updated successfully, but these errors were encountered:
@Prateek-coder19 Sorry, I can't access your link. The verification captcha asks me to press a combination of buttons but it doesn't work even if I do it properly.
Before you start - checklist
Description
If the Document component is unmounted, then the request for the resource should be cancelled. It was the usual behaviour of v9.1.0. But it changed in v9.1.1. Now, it doesn't cancel the fetch request.
Steps to reproduce
Expected behavior
The request to the resource should be cancelled.
Actual behavior
The requests are still running in the background and it's throttling the network speed.
Additional information
Consider these two scenarios where:
In both cases, the instances of the Document components will be unmounted. In v9.1.0, the requests would have been cancelled. But that version had an issue mentioned here: #1062 which was fixed by this PR: #1877
With the new release v9.1.1, the requests don't get cancelled anymore. So, if I navigate through 10 PDFs which were not loaded while navigating, they don't get cancelled which in turn throttles the network speed for the ones I want to view.
Environment
The text was updated successfully, but these errors were encountered: