Skip to content

Commit 214f581

Browse files
committed
refactor(cdk/overlay): address internal issue (#32349)
Adds a workaround for an internal issue in the CDK overlay. (cherry picked from commit 6c4ce61)
1 parent 9aa4cc8 commit 214f581

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)