mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +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')
|
||||
else window.api.file.openPath(url)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user