Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/cdk/overlay/overlay-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
* @returns The portal attachment result.
*/
attach(portal: Portal<any>): any {
let attachResult = this._portalOutlet.attach(portal);

// Update the pane element with the given configuration.
// Insert the host into the DOM before attaching the portal, otherwise
// the animations module will skip animations on repeat attachments.
if (!this._host.parentElement && this._previousHostParent) {
this._previousHostParent.appendChild(this._host);
}

const attachResult = this._portalOutlet.attach(portal);

if (this._positionStrategy) {
this._positionStrategy.attach(this);
}
Expand Down