Skip to content

Commit

Permalink
fix(module:dropdown): fix dropdown contextmenu
Browse files Browse the repository at this point in the history
close #3768
  • Loading branch information
vthinkxie committed Jul 13, 2019
1 parent 4926b32 commit 34bc886
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/dropdown/nz-context-menu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ export class NzContextMenuService {
}

close(): void {
this.overlayRef.detach();
this.setOpenState(false);
this.clickOutsideSubscription.unsubscribe();
this.clickMenuSubscription.unsubscribe();
this.positionSubscription.unsubscribe();
if (this.overlayRef) {
this.overlayRef.detach();
this.setOpenState(false);
this.clickOutsideSubscription.unsubscribe();
this.clickMenuSubscription.unsubscribe();
this.positionSubscription.unsubscribe();
}
}

private handleClickOutside(): void {
Expand Down

0 comments on commit 34bc886

Please sign in to comment.