mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-07 17:33:18 +00:00
revert change on the menu primitives
This commit is contained in:
@@ -22,29 +22,29 @@ export const Menu = ({
|
||||
placement?: 'bottom' | 'top' | 'left' | 'right'
|
||||
}) => {
|
||||
const [trigger, menu] = children
|
||||
const boundaryElement = useOverlayBoundaryElement()
|
||||
const portalContainer = useOverlayPortalContainer()
|
||||
// const boundaryElement = useOverlayBoundaryElement()
|
||||
// const portalContainer = useOverlayPortalContainer()
|
||||
|
||||
// Detect if we're in PiP: portal container is in a different document than the main window
|
||||
const isInPiP = useMemo(
|
||||
() =>
|
||||
portalContainer &&
|
||||
portalContainer.ownerDocument &&
|
||||
portalContainer.ownerDocument !== document,
|
||||
[portalContainer]
|
||||
)
|
||||
// // Detect if we're in PiP: portal container is in a different document than the main window
|
||||
// const isInPiP = useMemo(
|
||||
// () =>
|
||||
// portalContainer &&
|
||||
// portalContainer.ownerDocument &&
|
||||
// portalContainer.ownerDocument !== document,
|
||||
// [portalContainer]
|
||||
// )
|
||||
|
||||
// Default placement: 'bottom' in PiP, 'top' elsewhere (to match existing behavior)
|
||||
const defaultPlacement = isInPiP ? 'bottom' : 'top'
|
||||
const shouldFlip = isInPiP ? false : undefined
|
||||
// const defaultPlacement = isInPiP ? 'bottom' : 'top'
|
||||
// const shouldFlip = isInPiP ? false : undefined
|
||||
|
||||
return (
|
||||
<MenuTrigger>
|
||||
{trigger}
|
||||
<StyledPopover
|
||||
placement={placement ?? defaultPlacement}
|
||||
shouldFlip={shouldFlip}
|
||||
boundaryElement={boundaryElement}
|
||||
placement={placement}
|
||||
// shouldFlip={shouldFlip}
|
||||
// boundaryElement={boundaryElement}
|
||||
>
|
||||
<Box size="sm" type="popover" variant={variant}>
|
||||
{menu}
|
||||
|
||||
Reference in New Issue
Block a user