Skip to content

Fix: Share dialog invisible in fullscreen mode#509

Merged
Skywalker-organa merged 3 commits into
CodeChefVIT:stagingfrom
Gslmao-s-Org:Gslmao/fixShareButton
Jun 9, 2026
Merged

Fix: Share dialog invisible in fullscreen mode#509
Skywalker-organa merged 3 commits into
CodeChefVIT:stagingfrom
Gslmao-s-Org:Gslmao/fixShareButton

Conversation

@Gslmao

@Gslmao Gslmao commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

📌 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

@Skywalker-organa Skywalker-organa merged commit 8fafe23 into CodeChefVIT:staging Jun 9, 2026
1 check passed
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

2 participants