fix(web): portal overlays into fullscreenElement so they render in voice fullscreen
requestFullscreen() on the voice container puts only its descendants in the browser's top layer; overlays portaled to document.body were rendered outside that layer and stayed invisible — most visibly the right-click context menu on stream tiles and voice user panels. Add usePortalContainer() hook returning document.fullscreenElement ?? document.body and re-rendering on fullscreenchange. Migrate every overlay reachable during a call: ContextMenuRenderer (desktop, submenu, mobile sheet), Tooltip, ConfirmDialog, ConnectionInfoPopover, ScreenShareSettingsPopover, and ScreenSharePicker (which previously rendered inline at App root).
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { usePortalContainer } from '../../hooks/usePortalContainer';
|
||||
|
||||
interface ConfirmDialogProps {
|
||||
isOpen: boolean;
|
||||
@@ -38,6 +39,8 @@ export function ConfirmDialog({
|
||||
}
|
||||
}, [isOpen, handleKeyDown]);
|
||||
|
||||
const portalContainer = usePortalContainer();
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
const isDanger = variant === 'danger';
|
||||
@@ -74,6 +77,6 @@ export function ConfirmDialog({
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
document.body,
|
||||
portalContainer,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user