Skip to content

Commit

Permalink
Update p-dialog. Emit onHide only if dialog is visible.
Browse files Browse the repository at this point in the history
Dialog should not emit onHide if it wasn't shown
  • Loading branch information
Hunroll authored Sep 7, 2018
1 parent b26a3e3 commit 1a821dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,9 @@ export class Dialog implements OnDestroy {
}

onOverlayHide() {
this.onHide.emit({});
if (this.visible) {
this.onHide.emit({});
}
this.unbindGlobalListeners();
this.dragging = false;

Expand Down

1 comment on commit 1a821dc

@stefalda
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the expected bahaviour...

Checke the issue here:

#6520

Please sign in to comment.