Do the filtering of reset / clear selection in one line
This commit is contained in:
parent
26ec011e3e
commit
53e5f7289b
@ -54,8 +54,13 @@ export class HotKeyService {
|
||||
}
|
||||
|
||||
this.modalService.dismissAll()
|
||||
if (e.key === 'Escape' && this.modalService.hasOpenModals()) {
|
||||
// If there is a modal open, just dismiss
|
||||
if (
|
||||
e.key === 'Escape' &&
|
||||
(this.modalService.hasOpenModals() ||
|
||||
this.document.getElementsByClassName('dropdown-menu show').length >
|
||||
0)
|
||||
) {
|
||||
// If there is a modal open or menu open, ignore the keydown event
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user