mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5007] Comments - textarea Escape event cannot be canceled (#5266)
* use keydown event * cancel event propagation * update tests
This commit is contained in:
committed by
Eugenio Romano
parent
f2cbd0cd9a
commit
79eb9365c8
@@ -277,7 +277,7 @@ describe('CommentsComponent', () => {
|
||||
}));
|
||||
|
||||
it('should clear comment when escape key is pressed', async(() => {
|
||||
const event = new KeyboardEvent('keyup', {'key': 'Escape'});
|
||||
const event = new KeyboardEvent('keydown', {'key': 'Escape'});
|
||||
let element = fixture.nativeElement.querySelector('#comment-input');
|
||||
element.dispatchEvent(event);
|
||||
fixture.detectChanges();
|
||||
@@ -365,7 +365,7 @@ describe('CommentsComponent', () => {
|
||||
}));
|
||||
|
||||
it('should clear comment when escape key is pressed', async(() => {
|
||||
const event = new KeyboardEvent('keyup', {'key': 'Escape'});
|
||||
const event = new KeyboardEvent('keydown', {'key': 'Escape'});
|
||||
let element = fixture.nativeElement.querySelector('#comment-input');
|
||||
element.dispatchEvent(event);
|
||||
fixture.detectChanges();
|
||||
|
Reference in New Issue
Block a user