Skip to content

🐛(frontend) exit fullscreen before printing presenter slides - #2944

Open
phaast wants to merge 1 commit into
suitenumerique:mainfrom
phaast:fix/2897-fullscreen-presentation-mode-print-dialog
Open

phaast wants to merge 1 commit into
suitenumerique:mainfrom
phaast:fix/2897-fullscreen-presentation-mode-print-dialog

Conversation

@phaast

@phaast phaast commented Oct 29, 2026

Copy link
Copy Markdown

Purpose

Fixes #2897

When presenting in fullscreen and exporting slides to PDF, the browser's native print dialog renders as a tiny thumbnail in the top-left corner on Firefox. The preview is squished and only displays the "Save to PDF" destination and basic buttons, leaving no space to adjust layout, margins, or page settings.

screenshot of the bug from the issue report

When exiting fullscreen while remaining in presentation mode, the print dialog opens normally: centered, full size, and with the complete preview and print options available.

Proposal

This behavior is a known Firefox quirk where native browser dialogs are constrained by the active fullscreen context. There is no control over the geometry of this native dialog while fullscreen is active.

Browsers like Chromium and Edge automatically exit browser fullscreen when window.print() is triggered. This PR adopts the same behavior for consistency:

  • Call await exit() from useBrowserFullscreen before triggering printPresenterSlides(slides) in exportPdf.

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

General requirements

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have added corresponding tests for new features or bug fixes (N/A: native browser fullscreen / print behavior)

Skip the checkbox below 👇 if you're fixing an issue or adding documentation

  • Before submitting a PR for a new feature I made sure to contact the product manager

CI requirements

  • I made sure that all existing tests are passing
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)

AI requirements

Skip the checkboxes below 👇 If you didn't use AI for your contribution

  • I used AI assistance to produce part or all of this contribution (searching the codebase)
  • I have read, reviewed, understood and can explain the code I am submitting
  • I can jump in a call or a chat to explain my work to a maintainer

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The presenter PDF export callback now awaits exit() before printing the slides. Its dependency list includes exit. The Unreleased changelog records this change.

Estimated code review effort: 2 (Simple) | ~8 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 53af6

The change exits fullscreen before exporting presenter slides to PDF, so Firefox should show the print dialog at its normal size. No material merge risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the presenter slides now exit fullscreen before printing. The changeset adds an await exit() call from useBrowserFullscreen before printPresenterSlides in the PDF expo…
Description check Passed The description explains the problem: on Firefox, the native print dialog opens as a tiny thumbnail while presenting in fullscreen. It names the fix, which calls await exit() from useBrowserFullscreen…
Linked Issues check Passed Issue #2897 requires the print dialog to open at normal size and position when exporting slides from fullscreen presentation mode. The whole-PR diff (merge base to head) for PresenterOverlay.tsx sho…
Out of Scope Changes check Passed The whole-PR changes are limited to PresenterOverlay.tsx and a CHANGELOG.md entry. The PresenterOverlay.tsx change moves the useBrowserFullscreen() call above the export callback and adds `awa…
Full details: Title check

Explanation

The title names the main change: the presenter slides now exit fullscreen before printing. The changeset adds an await exit() call from useBrowserFullscreen before printPresenterSlides in the PDF export path, which matches the title. The title is short and specific, and it uses the repository's gitmoji and scope format.

Full details: Description check

Explanation

The description explains the problem: on Firefox, the native print dialog opens as a tiny thumbnail while presenting in fullscreen. It names the fix, which calls await exit() from useBrowserFullscreen before printing, and it links the issue (#2897). It is directly related to the changeset.

Full details: Linked Issues check

Explanation

Issue #2897 requires the print dialog to open at normal size and position when exporting slides from fullscreen presentation mode. The whole-PR diff (merge base to head) for PresenterOverlay.tsx shows useBrowserFullscreen() now destructures exit. The exportPdf callback calls await exit() before await printPresenterSlides(slides, { queryClient }). The useCallback dependency list includes exit. This implements the required sequence: exit browser fullscreen, then print. The issue states no automated test requirement. The PR test checkbox is marked N/A for native browser behavior, and the issue asks for no test. The changelog entry is not a coding requirement. Unverified: the code does not show whether the existing enter() effect re-enters fullscreen after printing. The issue does not require this behavior, so it does not affect the verdict.

Full details: Out of Scope Changes check

Explanation

The whole-PR changes are limited to PresenterOverlay.tsx and a CHANGELOG.md entry. The PresenterOverlay.tsx change moves the useBrowserFullscreen() call above the export callback and adds await exit() before printing. Both changes directly implement #2897. The changelog entry documents the same fix. The reviewed diff shows no unrelated change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: dca7a091-ec04-4a89-a392-350327b1cb5e
Commits

Reviewing files that changed from the base of the PR and between bbdb2a0 and 53af629.

Files selected for processing: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AntoLC
AntoLC self-requested a review October 30, 2026 08:21
@AntoLC AntoLC added bug Something isn't working frontend export labels Oct 30, 2026
@phaast
phaast force-pushed the fix/2897-fullscreen-presentation-mode-print-dialog branch from 8ad0f85 to 79669a4 Compare November 5, 2026 09:22
@phaast
phaast force-pushed the fix/2897-fullscreen-presentation-mode-print-dialog branch from 79669a4 to bbdb2a0 Compare November 15, 2026 13:30
@phaast

phaast commented Nov 15, 2026

Copy link
Copy Markdown
Author

@AntoLC sorry for bumping, but is there anything missing from my side that this pr is not reviewed?

When exporting presenter slides to PDF from browser fullscreen,
Firefox renders the native print dialog as a miniature in the
top-left corner due to a viewport clipping conflict with fullscreen.

This commit exits fullscreen mode before triggering presenter print
export so the print dialog renders at normal dimensions and position.
This behavior matches other browsers like Chrome and Edge.

Fixes suitenumerique#2897

Signed-off-by: phaast <abednarek224@gmail.com>
@AntoLC
AntoLC force-pushed the fix/2897-fullscreen-presentation-mode-print-dialog branch from bbdb2a0 to 53af629 Compare November 24, 2026 10:07

@AntoLC AntoLC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntoLC sorry for bumping, but is there anything missing from my side that this pr is not reviewed?

On your side no :) On my side, time ^^

Thank you for your contribution 🙏

@AntoLC AntoLC self-assigned this Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working export frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛(Bug) PDF print dialog is tiny and stuck in the top-left corner when exporting from fullscreen presentation mode

2 participants