Skip to content

Commit

Permalink
fix(primeng/sidebar): handle closeOnEscape option
Browse files Browse the repository at this point in the history
  • Loading branch information
volvachev authored and Egor Volvachev committed May 13, 2022
1 parent add0e0c commit a828807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/sidebar/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class Sidebar implements AfterViewInit, AfterContentInit, OnDestroy {

this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {
if (event.which == 27) {
if (parseInt(this.container.style.zIndex) === (DomHandler.zindex + this.baseZIndex)) {
if (parseInt(this.container.style.zIndex) === ZIndexUtils.get(this.container)) {
this.close(event);
}
}
Expand Down

0 comments on commit a828807

Please sign in to comment.