Skip to content

Commit

Permalink
Merge pull request #6596 from nextcloud/backport/6575/stable29
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Nov 7, 2024
2 parents a148751 + 7d380a8 commit c298167
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ export function linkClicking() {
click: (view, event) => {
const linkEl = event.target.closest('a')
if (event.button === 0 && linkEl) {
// No special handling in mermaid diagrams to not break links there
if (linkEl.closest('svg[id^="mermaid-view"]')) {
return false
}

event.preventDefault()
if (isLinkToSelfWithHash(linkEl.attributes.href?.value)) {
// Open anchor links directly
Expand Down

0 comments on commit c298167

Please sign in to comment.