Skip to content

Commit 6c4ce61

Browse files
authored
refactor(cdk/overlay): address internal issue (#32349)
Adds a workaround for an internal issue in the CDK overlay.
1 parent 11834c6 commit 6c4ce61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cdk/overlay/overlay.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,13 @@ export function createOverlayRef(injector: Injector, config?: OverlayConfig): Ov
8989
? overlayConfig.positionStrategy?.getPopoverInsertionPoint?.()
9090
: null;
9191

92+
overlayContainer.getContainerElement().appendChild(host);
93+
94+
// Note: it's redundant to pass the `host` through the container element above if
95+
// it's going to end up at the custom insertion point anyways. We need to do it,
96+
// because some internal clients depend on the host passing through the container first.
9297
if (customInsertionPoint) {
9398
customInsertionPoint.after(host);
94-
} else {
95-
overlayContainer.getContainerElement().appendChild(host);
9699
}
97100

98101
return new OverlayRef(

0 commit comments

Comments
 (0)