Skip to content

[Bug]: Zooming after PDF fills display width moves view to top left #20630

@ivanstepanovftw

Description

@ivanstepanovftw

Attach (recommended) or Link to PDF file

firefox_pdf_zoom.mp4

Web browser and its version

Firefox 146.0.1

Operating system and its version

Manjaro

PDF.js version

v5.4.624

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Use custom userContent.css:
    #viewer {
      filter: invert(100%) hue-rotate(180deg) !important;
    }
  2. Zoom in
  3. Keep zooming in until PDF page overflows display width
  4. Observe odd behavior of zooming in to the first page top left corner instead of zooming in to the current cursor location
  5. Zoom out and repeat

What is the expected behavior?

Zooming in to the cursor location on the current page
Zooming out from the cursor location on the current page

What went wrong?

Zooming in to the top left location of the first page
Zooming out from the top left location of the first page

Link to a viewer

No response

Additional context

Same on this page https://mozilla.github.io/pdf.js/web/viewer.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions