[ADF-5007] Comments - textarea Escape event cannot be canceled (#5266)

* use keydown event

* cancel event propagation

* update tests
This commit is contained in:
Cilibiu Bogdan
2019-12-03 16:11:22 +02:00
committed by Eugenio Romano
parent f2cbd0cd9a
commit 79eb9365c8
3 changed files with 5 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
</div>
<div class="adf-comments-input-container" *ngIf="!isReadOnly()">
<mat-form-field class="adf-full-width">
<textarea (keyup.escape)="clear()" matInput id="comment-input" placeholder="{{'COMMENTS.ADD' | translate}}" [(ngModel)]="message"></textarea>
<textarea (keydown.escape)="clear($event)" matInput id="comment-input" placeholder="{{'COMMENTS.ADD' | translate}}" [(ngModel)]="message"></textarea>
</mat-form-field>
<div class="adf-comments-input-actions">