Skip to content

Commit 21cc21e

Browse files
authored
refactor(cdk/overlay): re-add internal workaround (angular#32395)
Re-adds a workaround for an internal bug.
1 parent ddccc8a commit 21cc21e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cdk/overlay/overlay.ts

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

92+
// Note: this is redundant since the host will be moved into its final location immediately
93+
// after. We're keeping it as a temporary workaround, because an internal team depends on
94+
// this behavior. We can roll this back after January 5th 2026.
95+
overlayContainer.getContainerElement().appendChild(host);
96+
9297
if (isElement(customInsertionPoint)) {
9398
customInsertionPoint.after(host);
9499
} else if (customInsertionPoint?.type === 'parent') {
95100
customInsertionPoint.element.appendChild(host);
96-
} else {
97-
// Note: leave the container for last so that we fall
98-
// back to it for unsupported/newly-added values.
99-
overlayContainer.getContainerElement().appendChild(host);
100101
}
101102

102103
return new OverlayRef(

0 commit comments

Comments
 (0)