Skip to content

fix(pdfviewer): disable horizontal scrollbar in PDF viewer#1

Merged
TYBLHQY merged 1 commit into
masterfrom
worktree-disable-pdf-horizontal-scrollbar
Jul 18, 2026
Merged

fix(pdfviewer): disable horizontal scrollbar in PDF viewer#1
TYBLHQY merged 1 commit into
masterfrom
worktree-disable-pdf-horizontal-scrollbar

Conversation

@TYBLHQY

@TYBLHQY TYBLHQY commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Disables the horizontal scrollbar in the PDF viewer (). When users zoomed into a PDF beyond the viewport width, a horizontal scrollbar would appear — this change constrains the viewer to vertical-only scrolling.

Changes

  1. src/index.css — Added to to prevent horizontal overflow from creating a scrollbar
  2. src/components/document/PdfViewer.tsx — Updated the middle-click pan handler to vertical-only since horizontal scroll is now disabled

Verification

  • Open a PDF and zoom in beyond viewport width → no horizontal scrollbar appears
  • Vertical scrolling continues to work normally
  • Middle-click drag still pans vertically
  • The "Show PDF scrollbar" setting toggle still works for the vertical scrollbar

🤖 Generated with Claude Code

- Add overflow-x: hidden to .PdfHighlighter to prevent horizontal overflow
- Update middle-click pan to vertical-only since horizontal scroll is disabled

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TYBLHQY
TYBLHQY marked this pull request as ready for review July 18, 2026 21:59
@TYBLHQY
TYBLHQY merged commit 2c9b102 into master Jul 18, 2026
1 check passed
@TYBLHQY
TYBLHQY deleted the worktree-disable-pdf-horizontal-scrollbar branch July 18, 2026 21:59
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