mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-4995] Metadata - edit mode cannot be access via keyboard (#5253)
* use keydown over keyup * fix test * fix tests
This commit is contained in:
committed by
Eugenio Romano
parent
3dd43ce9b5
commit
81dcfa4341
@@ -84,7 +84,9 @@ export class CardViewTextItemComponent implements OnChanges {
|
||||
}, 0);
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
reset(event: MouseEvent|KeyboardEvent): void {
|
||||
event.stopPropagation();
|
||||
|
||||
this.editedValue = this.property.multiline ? this.property.displayValue : this.property.value;
|
||||
this.setEditMode(false);
|
||||
this.resetErrorMessages();
|
||||
@@ -94,7 +96,9 @@ export class CardViewTextItemComponent implements OnChanges {
|
||||
this.errorMessages = [];
|
||||
}
|
||||
|
||||
update(): void {
|
||||
update(event: MouseEvent|KeyboardEvent): void {
|
||||
event.stopPropagation();
|
||||
|
||||
if (this.property.isValid(this.editedValue)) {
|
||||
const updatedValue = this.prepareValueForUpload(this.property, this.editedValue);
|
||||
this.cardViewUpdateService.update(this.property, updatedValue);
|
||||
|
Reference in New Issue
Block a user