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 6e958df commit d564474Copy full SHA for d564474
webview-ui/src/components/history/CopyButton.tsx
@@ -13,16 +13,13 @@ export const CopyButton = ({ itemTask }: CopyButtonProps) => {
13
const { isCopied, copy } = useClipboard()
14
const { t } = useAppTranslation()
15
16
- const onCopy = useCallback(
17
- (e: React.MouseEvent) => {
18
- e.stopPropagation()
19
- const tempDiv = document.createElement("div")
20
- tempDiv.innerHTML = itemTask
21
- const text = tempDiv.textContent || tempDiv.innerText || ""
22
- !isCopied && copy(text)
23
- },
24
- [isCopied, copy, itemTask],
25
- )
+ const onCopy = useCallback(
+ (e: React.MouseEvent) => {
+ e.stopPropagation()
+ !isCopied && copy(itemTask)
+ },
+ [isCopied, copy, itemTask],
+ )
26
27
return (
28
<Button
0 commit comments