Skip to content

Commit

Permalink
Fixed #10491
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Aug 10, 2021
1 parent 98db71d commit 664fb78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/styleclass/styleclass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export class StyleClass implements AfterViewInit, OnDestroy {
DomHandler.addClass(this.target, this.leaveToClass);
}
}

if (this.hideOnOutsideClick) {
this.unbindDocumentListener();
}
}

resolveTarget() {
Expand Down Expand Up @@ -166,7 +170,6 @@ export class StyleClass implements AfterViewInit, OnDestroy {
}
else if (!this.el.nativeElement.isSameNode(event.target) && !this.el.nativeElement.contains(event.target) && !this.target.contains(event.target)) {
this.leave();
this.unbindDocumentListener();
}
});
}
Expand Down

0 comments on commit 664fb78

Please sign in to comment.