diff --git a/packages/mgt-components/src/components/sub-components/mgt-flyout/mgt-flyout.ts b/packages/mgt-components/src/components/sub-components/mgt-flyout/mgt-flyout.ts index 19c47c3c6c..f2b40ed5ac 100644 --- a/packages/mgt-components/src/components/sub-components/mgt-flyout/mgt-flyout.ts +++ b/packages/mgt-components/src/components/sub-components/mgt-flyout/mgt-flyout.ts @@ -364,8 +364,15 @@ export class MgtFlyout extends MgtBaseTaskComponent { height = anchorRectTopToWindowTop; } } else { - top = anchorRect.bottom; - height = anchorRectBottomToWindowBottom; + if (anchorRectTopToWindowTop >= flyoutRect.height) { + // render above anchor + bottom = windowRect.height - anchorRect.top; + height = anchorRectTopToWindowTop; + } else { + // render below anchor + top = anchorRect.bottom; + height = anchorRectBottomToWindowBottom; + } } } else { if (flyoutRect.height + 2 * this._edgePadding > windowRect.height) {