[Bug]: Combination of defaultZoomValue: page-height and scrollModeOnLoad: 3 = unable to scroll past page with keyboard
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 53.9k
- Forks
- 10.7k
- Avg merge
- 18h 38m
- Merged PRs (30d)
- 130
Description
Attach (recommended) or Link to PDF file
Any multiple pages long PDF file will do.
Web browser and its version
Firefox 156.0 / Thunderbird 156.0 / Firefox 140.13.0esr
Operating system and its version
Windows 11 25H2
PDF.js version
(Sorry but: How can I find it?)
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Set the following values in user.js:
- user_pref("pdfjs.defaultZoomValue", "page-height");
- user_pref("pdfjs.scrollModeOnLoad", 3); // 3 = page
- user_pref("pdfjs.viewOnLoad", 1); // Just to make sure the settings above are applied
- Open any multiple site long PDF file
- Try to scroll with the arrow or page up/down keys
What is the expected behavior?
The arrow or page up/down keys scroll to the next page of the PDF.
What went wrong?
PDF.js stays on the displayed page.
Link to a viewer
No response
Additional context
Using the up/down buttons in the toolbar, it is possible to scroll between pages.
When setting the zoom to any other setting and then resetting it to page-height, scrolling with those keyboard keys becomes possible.
So the issue only occurs when starting with the mentioned user.js settings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the PDF.js viewer using a multi-page PDF and the three user.js settings listed in the report. Start by tracing keyboard page navigation alongside the initial page-height zoom setup, then verify that arrow and page up/down keys advance pages without requiring a later zoom change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100