mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-16 22:24:49 +00:00
AAE-42291 Double-click to copy to clipboard does not work on disabled/read-only fields in card-view-textitem (#11656)
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
[ngClass]="{
|
||||
'adf-property-read-only': isReadonlyProperty
|
||||
}"
|
||||
(dblclick)="copyToClipboard(property.displayValue)"
|
||||
[attr.data-automation-id]="'card-textitem-field-' + property.key"
|
||||
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
|
||||
>
|
||||
<mat-label
|
||||
[attr.data-automation-id]="'card-textitem-label-' + property.key"
|
||||
@@ -33,8 +36,6 @@
|
||||
[placeholder]="property.default"
|
||||
[attr.aria-label]="property.label | translate"
|
||||
[formControl]="textInput"
|
||||
(dblclick)="copyToClipboard(property.displayValue)"
|
||||
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
|
||||
[attr.data-automation-id]="'card-textitem-value-' + property.key"
|
||||
(keydown)="undoText($event)"
|
||||
(blur)="update()"
|
||||
|
||||
@@ -76,6 +76,12 @@
|
||||
color: var(--adf-metadata-property-panel-title-color);
|
||||
}
|
||||
|
||||
input.adf-property-value:disabled,
|
||||
textarea.adf-property-value:disabled {
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.adf-property-value-has-icon-suffix {
|
||||
padding-right: 34px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -562,7 +562,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
testingUtils.doubleClickByDataAutomationId(`card-textitem-value-${component.property.key}`);
|
||||
testingUtils.doubleClickByDataAutomationId(`card-textitem-field-${component.property.key}`);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user