We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11479a8 commit 67d6eefCopy full SHA for 67d6eef
packages/uui-text-copy/lib/uui-button-copy-text.element.ts
@@ -64,12 +64,12 @@ export class UUIButtonCopyTextElement extends UUIButtonElement {
64
// Try & find an element with the ID
65
const el = document.getElementById(this.copyFrom);
66
if (el) {
67
- valueToCopy = el.textContent ?? el.innerText ?? '';
68
-
69
- // Override the value to copy ,if the element has a value property
+ // Override the value to copy, if the element has a value property
70
// Such as uui-input or uui-textarea or native inout elements
71
if ('value' in el) {
72
valueToCopy = (el as any).value;
+ } else {
+ valueToCopy = el.textContent ?? el.innerText ?? '';
73
}
74
} else {
75
console.error(`Element ID ${this.copyFrom} not found to copy from`);
0 commit comments