Skip to content

Page refreshes after zooming PDF (even with small file and low maxZoom) #600

@xhxhxhxh

Description

@xhxhxhxh

url: https://codesandbox.io/p/devbox/quizzical-colden-2mnx9k

Description

When using embed-pdf-viewer on mobile Safari, zooming the PDF (pinch zoom) to a certain level causes the entire page to refresh/reload unexpectedly.

This happens even with a very small PDF file (only 6 pages), and even when maxZoom is set to a low value (e.g., 2).


Steps to Reproduce

  1. Open the page in Safari (iOS)
  2. Load a PDF (6 pages in my case)
  3. Use pinch gesture to zoom in
  4. After zooming to a certain level, the page suddenly refreshes

Expected Behavior

  • PDF should zoom smoothly within the defined maxZoom range
  • The page should not refresh or reload

Actual Behavior

  • After zooming in (pinch gesture), the entire webpage refreshes
  • This interrupts the viewing experience and resets the PDF state

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions