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

Javascript error in full screen: PDFViewer_setCurrentPageNumber: "X" is out of bounds. #8498

Closed
Burkazoid opened this issue Jun 7, 2017 · 2 comments
Labels

Comments

@Burkazoid
Copy link

Burkazoid commented Jun 7, 2017

Occurs when viewing any PDF.

Configuration:

  • Web browser and its version: Chrome (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36)
  • Operating system and its version: Windows 10
  • PDF.js version: Latest (occurs on demo)

Steps to reproduce the problem:

  1. Open any pdf file with pdfjs (or go to demo: https://mozilla.github.io/pdf.js/web/viewer.html)
  2. Click into full screen / presentation mode.
  3. Keep clicking on page to go to the next page. Once you click on the final page, you'll get a javascript error in your console: "PDFViewer_setCurrentPageNumber: "X" is out of bounds" for each click, where X is the number of the last page + 1.

What is the expected behavior?
No javascript error occurring.

What went wrong?
Javascript error: "PDFViewer_setCurrentPageNumber: "X" is out of bounds" for each click.

Thankfully this doesn't break any functionality, just produces an error in the console.

@Burkazoid Burkazoid changed the title Javascript error: PDFViewer_setCurrentPageNumber: "X" is out of bounds. Javascript error in full screen: PDFViewer_setCurrentPageNumber: "X" is out of bounds. Jun 7, 2017
@Burkazoid
Copy link
Author

From looking at the code, perhaps this is intentional. Just seems a bit odd to me to produce a console error for standard user behaviour.

@timvandermeij
Copy link
Contributor

Closing since this is fixed in the pull request above. Thank you for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants