Merge pull request #4057 from kovsu/fix/#4019
feat(desktop): enhance link handling
This commit is contained in:
parent
8bcc6faada
commit
4e6e63329e
|
|
@ -89,6 +89,18 @@ export const EntryItemWrapper: FC<
|
|||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
const target = e.target as HTMLElement
|
||||
const linkElement = target.closest("a")
|
||||
|
||||
if (linkElement) {
|
||||
const href = linkElement.getAttribute("href")
|
||||
if (!href) return
|
||||
|
||||
if (entry?.id && href.endsWith(entry.id)) return
|
||||
window.open(href, "_blank")
|
||||
return
|
||||
}
|
||||
|
||||
const shouldNavigate = getRouteParams().entryId !== entry?.id
|
||||
|
||||
if (!shouldNavigate) return
|
||||
|
|
|
|||
Loading…
Reference in New Issue