Skip to content

Commit 3ed80d8

Browse files
committed
Stop copy button's event propation
1 parent 126d885 commit 3ed80d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webview/src/shared/components/copyButton/CopyButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export const CopyButton: React.FC<{
4444
<button
4545
title={copyIconTitles[state]}
4646
className={cx(styles.button, className)}
47-
onClick={() => {
47+
onClick={e => {
48+
e.preventDefault()
49+
e.stopPropagation()
4850
navigator.clipboard
4951
.writeText(value)
5052
.then(() => {

0 commit comments

Comments
 (0)