mozilla / mozilla/pdf.js

[Bug]: Combination of defaultZoomValue: page-height and scrollModeOnLoad: 3 = unable to scroll past page with keyboard

Open
#21,974 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

requires-feedback-from-ux-ui viewer
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
  1. 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
  1. Open any multiple site long PDF file
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.