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:
Tomasz Nastaly
2026-02-19 10:44:07 +01:00
committed by GitHub
parent e48950b200
commit 1baddb2b37
3 changed files with 10 additions and 3 deletions

View File

@@ -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()"

View File

@@ -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;

View File

@@ -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(