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

Don't try to insert a structTree in a removed page (PR 13171 follow-up) #13310

Merged
merged 1 commit into from
Apr 29, 2021

Commits on Apr 28, 2021

  1. Don't try to insert a structTree in a removed page (PR 13171 follow-up)

    Given that both the textLayer rendering *and* the structTree parsing is asynchronous, it's possible that we'll attempt to insert the structTree in a removed page. While there's thankfully no outright breakage caused by this, it will nonetheless lead to errors being printed in the console and we should obviously avoid this.
    
    To reproduce this bug (without the patch), open http://localhost:8888/web/viewer.html?file=/test/pdfs/pdf.pdf#disableStream=true&disableAutoFetch=true and scroll *very quickly* through the document and notice the following error being (intermittently) printed in the console:
    ```
    Uncaught (in promise) TypeError: can't access property "appendChild", this.canvas is undefined
    ```
    Snuffleupagus committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    4d36659 View commit details
    Browse the repository at this point in the history