Skip to content

Commit

Permalink
fixed #6456 Add keyboard shortcut to lightbox so a user can escape ou…
Browse files Browse the repository at this point in the history
…t of the lightbox without use of the mouse
  • Loading branch information
yigitfindikli committed Jul 5, 2019
1 parent 84c22ad commit 56ddbc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/components/lightbox/lightbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ export class Lightbox implements AfterViewInit,OnDestroy {
ngOnDestroy() {
if(this.documentClickListener) {
this.documentClickListener();
this.documentClickListener = null;
}

if(this.documentEscapeListener) {
this.documentEscapeListener();
this.documentEscapeListener = null;
}

if(this.appendTo) {
Expand Down

0 comments on commit 56ddbc0

Please sign in to comment.