diff --git a/.changeset/small-trees-invite.md b/.changeset/small-trees-invite.md new file mode 100644 index 0000000000..01500e1666 --- /dev/null +++ b/.changeset/small-trees-invite.md @@ -0,0 +1,5 @@ +--- +"@patternfly/elements": patch +--- + +``: hide content when copy/pasting tooltip elements diff --git a/elements/pf-tooltip/pf-tooltip.css b/elements/pf-tooltip/pf-tooltip.css index 790bdce193..8a017283c2 100644 --- a/elements/pf-tooltip/pf-tooltip.css +++ b/elements/pf-tooltip/pf-tooltip.css @@ -21,6 +21,7 @@ #tooltip { --_timestamp-text-decoration: none; --_timestamp-text-underline-offset: initial; + user-select: none; display: block; opacity: 0; pointer-events: none; @@ -70,6 +71,7 @@ .open #tooltip { opacity: 1; + user-select: initial; } /* LEFT */ diff --git a/elements/pf-tooltip/pf-tooltip.ts b/elements/pf-tooltip/pf-tooltip.ts index 6bd4954c3a..f89beba20d 100644 --- a/elements/pf-tooltip/pf-tooltip.ts +++ b/elements/pf-tooltip/pf-tooltip.ts @@ -189,7 +189,7 @@ export class PfTooltip extends LitElement { aria-labelledby="tooltip"> -
+
${this.content}