Skip to content

Commit

Permalink
fix(kcopy): not using actual button
Browse files Browse the repository at this point in the history
Fix KCopy not using an actual button for its click interaction.

Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
  • Loading branch information
Philipp Rudloff committed Apr 4, 2024
1 parent 30d6091 commit f0ff988
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/KCopy/KCopy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
:text="tooltipText"
>
<KClipboardProvider v-slot="{ copyToClipboard }">
<CopyIcon
<button
:id="copyButtonElementId"
class="text-icon"
data-testid="copy-to-clipboard"
:hide-title="!!copyTooltip || undefined"
role="button"
:size="KUI_ICON_SIZE_30"
tabindex="0"
type="button"
@click.stop="copyIdToClipboard(copyToClipboard)"
@keydown.enter="copyIdToClipboard(copyToClipboard)"
@keydown.space.prevent="copyIdToClipboard(copyToClipboard)"
/>
>
<CopyIcon
class="text-icon"
:hide-title="!!copyTooltip || undefined"
:size="KUI_ICON_SIZE_30"
/>
</button>
</KClipboardProvider>
</KTooltip>
</div>
Expand Down

0 comments on commit f0ff988

Please sign in to comment.