For the moment I have managed with HostListener to call that method but this should happen without closing the modal.
@HostListener('document:keydown.escape', ['$event']) onKeydownHandler(event: KeyboardEvent) {
console.log(event);
if(this.deleteIsAllowed()){
this.showDialogForClosing();
}
}
CodePudding user response:
maybe you can try to use event.preventDefault()
or event.stopPropagation()
.
Can you please give us the library name you are using? Sometimes you can configure the closing behaviour of the modal.