Fix PDF viewer only filling ~1/6 of viewport #78

Merged
qwc merged 1 commit from fix/pdf-viewer-height into feature/pdf-upload-support 2026-02-20 07:23:14 +01:00
Owner

Summary

  • Fix <embed> element not filling viewport: replaced elements don't compute height from top+bottom constraints, so set explicit height: calc(100vh - overlayHeight)
  • Add resize event listener so the PDF viewer adjusts when the browser window is resized (e.g., overlay reflows on narrow screens)

Fixes #76

Test plan

  • Open a PDF version — verify the PDF fills the full viewport below the overlay
  • Resize the browser window — verify the PDF adjusts correctly
  • Narrow the window until the overlay wraps — verify the PDF still fills below it

🤖 Generated with Claude Code

## Summary - Fix `<embed>` element not filling viewport: replaced elements don't compute height from `top`+`bottom` constraints, so set explicit `height: calc(100vh - overlayHeight)` - Add `resize` event listener so the PDF viewer adjusts when the browser window is resized (e.g., overlay reflows on narrow screens) Fixes #76 ## Test plan - [ ] Open a PDF version — verify the PDF fills the full viewport below the overlay - [ ] Resize the browser window — verify the PDF adjusts correctly - [ ] Narrow the window until the overlay wraps — verify the PDF still fills below it 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The <embed> element is a replaced element that doesn't compute its
height from top+bottom constraints like block elements do. Set an
explicit height via calc(100vh - overlayHeight) and re-calculate on
window resize so the PDF always fills the space below the overlay.

Fixes #76

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
qwc merged commit a224a3f9e0 into feature/pdf-upload-support 2026-02-20 07:23:14 +01:00
qwc deleted branch fix/pdf-viewer-height 2026-02-20 07:23:14 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
qwc-open/asiakirjat!78
No description provided.