Skip to content

Commit 0e18159

Browse files
committed
ensure popover gets removed from the view
1 parent 38abdab commit 0e18159

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dialog/dialog.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ export class DialogService {
143143

144144
if (this.dialogRef) {
145145
let elementToFocus = this.dialogRef.instance.dialogConfig["previouslyFocusedElement"];
146-
if (this.dialogRef.instance.dialogConfig.appendInline) {
147-
viewContainer.remove(viewContainer.indexOf(this.dialogRef.hostView));
148-
} else if (this.placeholderService.hasPlaceholderRef()) {
146+
if (this.placeholderService.hasPlaceholderRef() && !this.dialogRef.instance.dialogConfig.appendInline) {
149147
this.placeholderService.destroyComponent(this.dialogRef);
148+
} else {
149+
viewContainer.remove(viewContainer.indexOf(this.dialogRef.hostView));
150150
}
151151
this.dialogRef = null;
152152
this.isOpen = false;

0 commit comments

Comments
 (0)