disable esc button when the viewer is not in overlaymode

This commit is contained in:
Eugenio Romano
2016-08-02 14:37:04 +01:00
parent 90f1dec1e3
commit 99f5744543
2 changed files with 19 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ export class ViewerComponent {
@HostListener('document:keydown', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {
let key = event.keyCode;
if (key === 27) { // esc
if (key === 27 && this.overlayMode) { // esc
this.close();
}
}