mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 06:19:05 +08:00
fix: prevent default action in handleLinkClick for better link handling
This commit is contained in:
parent
84bf76cc43
commit
34c49b84f6
@ -109,7 +109,8 @@ const CitationsList: React.FC<CitationsListProps> = ({ citations }) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleLinkClick = (url: string) => {
|
const handleLinkClick = (url: string, event: React.MouseEvent) => {
|
||||||
|
event.preventDefault()
|
||||||
if (url.startsWith('http')) window.open(url, '_blank', 'noopener,noreferrer')
|
if (url.startsWith('http')) window.open(url, '_blank', 'noopener,noreferrer')
|
||||||
else window.api.file.openPath(url)
|
else window.api.file.openPath(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user