Skip to content

fix(reader): restore desktop PDF controls and page scrolling#450

Open
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-desktop-pdf-controls
Open

fix(reader): restore desktop PDF controls and page scrolling#450
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-desktop-pdf-controls

Conversation

@codedogQBY

Copy link
Copy Markdown
Owner

Analysis

Issue #226 reports three Windows desktop PDF-reader problems:

  • toolbar controls cannot be recalled after auto-hide;
  • single-page PDF mode cannot scroll vertically with the mouse wheel;
  • double-page click zones are inaccurate.

The double-page click-zone/coordinate problem has already been addressed by the merged #292, so this PR focuses on the two remaining desktop PDF control problems.

For fixed-layout/PDF books, the desktop auto-hide click path still treated the first click after controls were hidden as a reading-area navigation click. That meant users could not reliably bring the toolbar back. Single-page PDF mode also routed wheel input directly through the page-turn path, so oversized/zoomed pages could not be scrolled before turning pages.

Changes

  • Pass fixed-layout state into the desktop control auto-hide hook and pagination hook.
  • When fixed-layout controls are hidden, make the first reader click show the controls instead of immediately navigating.
  • In single-page fixed-layout/PDF rendering (renderer spread="none"), let mouse-wheel input scroll the renderer first.
  • Fall back to the existing prev/next page-turn logic only when the PDF page cannot scroll further.
  • Keep non-PDF, scrolled mode, and double-page page-turn behavior unchanged.

Verification

  • pnpm --filter app exec tsc --noEmit
  • pnpm --filter @readany/core exec tsc --noEmit
  • git diff --check

Additional verification from the branch before final commit:

  • pnpm --filter app build passed with existing Vite chunk/dynamic-import warnings.
  • pnpm exec biome check packages/core/src/hooks/reader/usePagination.ts passed.
  • Targeted Biome over the two desktop reader files still reports pre-existing lint/format debt in ReaderView.tsx / FoliateViewer.tsx, unrelated to this small PDF control change.

Fixes #226

@codedogQBY codedogQBY added bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression area:reader Reader, pagination, scrolling, layout, TOC area:desktop Desktop, Tauri, Windows, macOS, Linux area:pdf PDF reading, import, selection, vectorization labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop Desktop, Tauri, Windows, macOS, Linux area:pdf PDF reading, import, selection, vectorization area:reader Reader, pagination, scrolling, layout, TOC bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PDF阅读过程中BUG

1 participant