[Library | Trunk]: Fs modal: Fix esc key

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60642 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-12 12:49:01 +00:00
parent 97e10df7b7
commit 372f33cb21
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ export class FullScreenModalComponent implements OnInit {
if (typeof document !== "undefined") {
document.body.appendChild(this.element);
this.subscriptions.push(fromEvent(document, 'keydown').pipe(delay(1)).subscribe((event: KeyboardEvent) => {
this.close();
if(event.keyCode === 27) {
this.close();
}
}));
}
}