Skip to content

Fix: Share dialog invisible in fullscreen mode#509

Open
Gslmao wants to merge 3 commits into
CodeChefVIT:stagingfrom
Gslmao-s-Org:Gslmao/fixShareButton
Open

Fix: Share dialog invisible in fullscreen mode#509
Gslmao wants to merge 3 commits into
CodeChefVIT:stagingfrom
Gslmao-s-Org:Gslmao/fixShareButton

Conversation

@Gslmao
Copy link
Copy Markdown
Contributor

@Gslmao Gslmao commented Jun 4, 2026

📌 Purpose

The share dialog was invisible when the PDF viewer was in fullscreen. Radix's DialogPortal defaults into document.body, but the browser's fullscreen API creates an isolated stacking context and only DOM nodes inside the fullscreen element are visible. So the dialog was rendering, just outside the visible fullscreen layer.


Corresponding issue: closes #444


🖼️ Showcase

image

🔧 Changes

  • dialog.tsx — added a container prop to DialogContent, passed it to DialogPortal so the render target is controllable from outside
  • ShareButton.tsx — added isFullscreen and viewerRef props; passes viewerRef.current as the portal container when in fullscreen, falls back to document.body otherwise
  • PDFViewer.tsx — passes isFullscreen and viewerRef down to ShareButton

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.

Share button+ Scroll

1 participant