[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:
parent
97e10df7b7
commit
372f33cb21
|
@ -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();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue