Skip to content

Commit ea86d33

Browse files
committed
chore: revert dialog workaround
1 parent eae6eeb commit ea86d33

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/lib/dialog/dialog-container.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
ChangeDetectorRef,
1818
ViewChild,
1919
ViewEncapsulation,
20-
ChangeDetectionStrategy,
2120
} from '@angular/core';
2221
import {animate, AnimationEvent, state, style, transition, trigger} from '@angular/animations';
2322
import {DOCUMENT} from '@angular/platform-browser';
@@ -119,13 +118,7 @@ export class MatDialogContainer extends BasePortalHost {
119118
}
120119

121120
this._savePreviouslyFocusedElement();
122-
123-
const componentRef = this._portalHost.attachComponentPortal(portal);
124-
125-
// Ensure that the initial view change are picked up.
126-
componentRef.changeDetectorRef.markForCheck();
127-
128-
return componentRef;
121+
return this._portalHost.attachComponentPortal(portal);
129122
}
130123

131124
/**
@@ -138,12 +131,7 @@ export class MatDialogContainer extends BasePortalHost {
138131
}
139132

140133
this._savePreviouslyFocusedElement();
141-
142-
const locals = this._portalHost.attachTemplatePortal(portal);
143-
144-
this._changeDetectorRef.markForCheck();
145-
146-
return locals;
134+
return this._portalHost.attachTemplatePortal(portal);
147135
}
148136

149137
/** Moves the focus inside the focus trap. */

0 commit comments

Comments
 (0)