[ACA-2176] prevent Esc click event bubble into the Viewer (#6378)

* prevent Esc click event bubble into the Viewer

* fix tests
This commit is contained in:
Denys Vuika
2020-12-02 13:48:44 +00:00
committed by GitHub
parent 567ea6cb0d
commit a3fabf632c
5 changed files with 45 additions and 11 deletions

View File

@@ -580,6 +580,10 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
*/
@HostListener('document:keyup', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {
if (event && event.defaultPrevented) {
return;
}
const key = event.keyCode;
// Esc