Skip to content

Keep PDF reading position fixed during pinch zoom - #38

Merged
bebraw merged 1 commit into
mainfrom
fix/pdf-pinch-vertical-anchor
Nov 18, 2026
Merged

bebraw merged 1 commit into
mainfrom
fix/pdf-pinch-vertical-anchor

Conversation

@bebraw

@bebraw bebraw commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve the point under the pinch on the visible PDF page when Continuous or Two-page view lays out the new page sizes.
  • Keep the zoom preview in place until the new layout is ready, then correct the scroll position immediately in the same frame.

Verification

  • Added a browser regression that tracks vertical drift frame by frame while pinching on a scrolled PDF page. The original behavior shifted the point by about 720 pixels. The fixed behavior stays within two pixels.
  • Updated unit coverage for the zoom layout timing and mixed page heights.
  • Ran npm run ci:local with an alternate port for the secondary test server.

@bebraw
bebraw merged commit 8ac3f16 into main Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant