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

DOM events called multiple times for each occurrence of PDFJS.webViewerLoad() #8524

Closed
curiosity26 opened this issue Jun 13, 2017 · 3 comments

Comments

@curiosity26
Copy link
Contributor

Link to PDF file (or attach file here):
Any PDF causes this issue

Configuration:

  • Web browser and its version: Chrome 58
  • Operating system and its version: Mac OS X 10.12.5
  • PDF.js version: 1.8.448
  • Is an extension: No

Steps to reproduce the problem:

  1. Configure PDF.js in a single page app
  2. Configure a way to generate a DOM element to render the PDF.js viewer by calling PDFJS.webViewerLoad(url)
  3. Configure a way to destroy the the DOM element
  4. Toggle on the Element
  5. Click Download - 1 document should download
  6. Toggle the element off and on again
  7. Click Download - 2 documents download
  8. Repeat Steps 6 and 7, another document downloads with each call of PDFJS.webViewerLoad(url)

What is the expected behavior? (add screenshot)
Only one PDF should download each time

What went wrong? (add screenshot)
Multiple PDF's downloaded

@yurydelendik
Copy link
Contributor

yurydelendik commented Jun 13, 2017

What's PDFJS.webViewerLoad?

We are exposing PDFViewerApplication which has open() method to accomplish the same.

@curiosity26
Copy link
Contributor Author

I apologize, I was looking at an angular script that wraps the PDFJS library.

The call is actually: PDFViewerApplication.run(config)

@yurydelendik
Copy link
Contributor

yurydelendik commented Jun 13, 2017

This issue looks out of scope of this project. I'll close it. (PR #8525 sounds like a good idea, but requires more work) I'm thinking this issue similar to #8402, so this one can be addressed but fixing the latter.

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

3 participants